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

Automatically append text to the summary field

I have created a custom work item type with two custom attributes.  When a user enters text in one of the custom attributes, I would like that text to be appended or prepended to the standard summary field.  Is this possible?  If so, what is the simplest way to accomplish this?

0 votes


Accepted answer

Permanent link
Attribute Customizations can help you.

You could write a Script based Calculated value for it and set the dependency of the Summary field to the custom attributes.  In your script, you need to carefully read the values of all three fields, Summary and Custom Attr1 and Custom Attr2 and create a return string which is returned to Summary. 

return workItem.getValue(WorkItemAttributes.SUMMARY) + "  attr1 : " + workItem.getValue("customAttr1ID") + " attr2 : " + workItem.getValue("customAttr2ID");

for more details on writing script based calculated value, refer to :
    https://jazz.net/wiki/bin/view/Main/AttributeCustomization
Michael Taylor selected this answer as the correct answer

0 votes

Comments

I need to spend some time with these articles.  But this sounds like exactly what I'm trying to accomplish.  Thank you for your very useful and detailed answer.


One other answer

Permanent link
Hello,

Yes, this is possible. I think the a solution (not sure if it's the "simpliest way" but it do the job) would be to create an operation participant which do that. On workitem save operation, you get the content of the custom attribute and modify the summary filed.
You may take a look at RTC extension workshop : https://jazz.net/library/article/1000

Regards,
Sylvain

1 vote

Comments

Is an operation participant a java plugin or can it be something else?  Does RTC provide a way to create an operation participant or does it have to be custom java code?

For what I know, OperationParticipant are only Java plugin as described in the workshop I mentioned in my previous post.

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
× 6,132

Question asked: May 02 '13, 9:02 a.m.

Question was seen: 5,487 times

Last updated: May 15 '13, 10:07 a.m.

Confirmation Cancel Confirm