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

RTC 6.0.1 - Getting Attribute Data from parent during child work item creation as default value.

 Hello Everyone,

The User is in the US work item. There is a custom attribute (say Field1) with some data HTML text data.
Now the user clicks on link > Add Children > Create new Linked task
Here is there a possibility to get the Data of Field1 from US as a default value in Field2 of TASK??

Steps Tried to Achieve the same(Not Successful):

Java Based Default Value: 
@Override
	public String getDefaultValue(IAttribute attribute, IWorkItem workItem,
			IWorkItemCommon workItemCommon, IConfiguration configuration,
			IProgressMonitor monitor) throws TeamRepositoryException {
		String testDeafult = "";
		IWorkItemReferences ref = workItemCommon.resolveWorkItemReferences(workItem, monitor);
		IEndPointDescriptor linkDescriptor = WorkItemEndPoints.CHILD_WORK_ITEMS;
        List<IReference> linkRef = ref.getReferences(linkDescriptor);
       
		if(linkRef.isEmpty())
		{
		// here there are no references returned by the default value 
		
		}
	}
	

Thanks in Adavance,

0 votes



One answer

Permanent link
I don't think it will work that way. What you want to do is called "pre-fill". Basically, your "create" action should get the data from existing work item, and send it along to the creation process of the new work item. In other words, the creation process should have such data _before_ creating a new work item. If you create a new work item first and try to find associated data from within, it will fail, as the new work item is essentially "blank".

0 votes

Comments

 Hello Donald,


Could you please provide us a way of solution of how we can achieve this functionality?

Thank You.

I can only think of the way that I described above, but I don't know whether it's doable or with which APIs, as I am not doing any actual development work with the Java API.

Your answer

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,934
× 92

Question asked: May 26 '16, 8:16 a.m.

Question was seen: 3,246 times

Last updated: May 27 '16, 3:10 a.m.

Confirmation Cancel Confirm