Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

JavaScript / EWM: Custom Presentation - How to add work item to work item list attribute?

Hello,

We are developing a custom presentation for a work item list attribute. After the user creates a new work item we need to add it to our work item list attribute. Note: This is an attribute of kind work item list. It is not a link.

How do we add a work item to the work item list attribute?

I get the current work item list just fine:

var workItemList = this.workingCopy.getValue( {
                            path: ["attributes", this.attributeId ],
                        });

workItemList is set to (for example):
{
​_eQualifiedClassName: "com.ibm.team.workitem.rest.dto:ListDTO",
items: (1) [
​​0: Object { itemId: "_7OqAYCT5EeubHdT_idS2yQ", stateId: "_7PGFTyT5EeubHdT_idS2yQ", _eQualifiedClassName: "com.ibm.team.workitem.rest.dto:WorkItemDTO", … }
​​],
length: 1,

}

How do we add to this list and update the work item list attribute value? Do we need to (somehow) create a new WorkItemDTO? Add it to the Items array? And then call .setValue()? Thank you for any help and advice.

Regards,
Kevin

0 votes


Be the first one to answer this question!

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Nov 13 '20, 1:49 p.m.

Question was seen: 856 times

Last updated: Nov 13 '20, 1:53 p.m.

Confirmation Cancel Confirm