It's all about the answers!

Ask a question

Possible to update Summary field in links?

Mark Ingebretson (58515136) | asked Feb 23 '15, 9:59 a.m.

We are looking for ways to update the Summary field which is part of work item links.

Here’s our problem. We have a project which has almost all of its work items created via Work Item Templates. When the work items are created, the Summary field in the work items is a standard set of text, something like “As a <role>, we need….”.

When the work items are created, the Summary field contents are copied into the parent/child links themselves.

Later the users replace the work item Summaries with actual Summaries, but these updates don’t get copied into the Summary fields in the links.

Here’s why it matters. In the Eclipse client we have queries that show the Parent field as one of the columns. In the query results view the data that is shown for the Parent field comes from the link rather than going out and loading the actual parent work item Summary data. So we see the original standard “As a <role>, we need….” for all work items rather than the correct, existing data. If we manually open the parent work item that row’s Parent data does update to the correct data.

The web client doesn’t have this behavior.

Is there a way to force the Summary attributes in the links to be re-written with the current data? If not, is there an API to do this in the Link Manager APIs?

2 answers

permanent link
Ralph Schoon (62.3k33643) | answered Feb 23 '15, 10:04 a.m.

there is no Summary field/attribute in the links section in any of the standard templates. This might be due to your customizations.

Ralph Schoon commented Feb 23 '15, 10:08 a.m.

Correction, the editor shows the general summary - but that is not a different presentation. The tab does not specify this. It is the shared header of all work items. There is no refresh or anything, if I edit that and switch tabs without saving, the data does not change. If I save, it still shows the correct data for any tab. I have to assume that you have some customization running, that has side effects.

Mark Ingebretson commented Feb 23 '15, 11:39 a.m. | edited Feb 24 '15, 4:43 a.m.

Hi Ralph,

Thanks for your comments.

Sorry, I didn’t do a very good job explaining the problem. I think seeing it yourself will make this more clear. It should be easy to reproduce with no customizations:

  1. Create a task

  2. Create a parent story. Set the summary of the story to be “This is the original text”. Save the parent (including the link to the child task).

  3. Change the summary of the story to be “This is the new text I want to see.” Save it.

  4. Create a query in Eclipse to find the task you created. Include the Parent link column.

You should see the original story summary in the Parent column, and not the new, current summary. If you double click on the task in the query results view, it loads the task in Eclipse and then the Parent column gets updated with the right data.

I should not have said that links contain “Summary fields”. Every ILink has a source and target IReference. These are the two ends of the link. If you look at the IReference JavaDoc, here's a quote:

A Reference can contain a String comment, for arbitrary use by clients.  One  convenient use is to capture the name of the referenced object so that it can  be displayed without having to resolve to and fetch the details of the  referenced object. However, if this is done, the comment will become out of  date if the target name changes.

So I guess my question is whether the IReference comments can be updated.

permanent link
Ralph Schoon (62.3k33643) | answered Feb 24 '15, 5:27 a.m.
edited Feb 24 '15, 5:28 a.m.
I see the same behavior in the Eclipse Client (5.0.2). I assume it has something to do with caching or refreshing. I have not found a way to fix this. I would suggest to create a defect or enhancement request.

Your answer

Register or to post your answer.