It's all about the answers!

Ask a question

Automatically append text to the summary field

Michael Taylor (8865764) | asked May 02 '13, 9:02 a.m.

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?

Accepted answer

permanent link
Dinesh Kumar B (4.1k413) | answered May 02 '13, 9:51 a.m.
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 :
Michael Taylor selected this answer as the correct answer

Michael Taylor commented May 02 '13, 10:28 a.m.

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
Sylvain LEQUEUX (2132728) | answered May 02 '13, 9:32 a.m.

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 :


Michael Taylor commented May 15 '13, 9:31 a.m.

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?

Sylvain LEQUEUX commented May 15 '13, 10:07 a.m.

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

Your answer

Register or 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.