Re: Running plugin code on all existing workitems
10 answers
You could try to synchronize all work items, as detailed in the Jazz article https://jazz.net/library/article/529:
The first thing to do is to create a work item query that identifies the work items to update.
Once you have created and executed your query strategy, highlight those needing the attribute to be added as shown in the following screen shot:
https://jazz.net/library/content/articles/rtc/2.0.0.2/cool-hidden-features/cool-hidden-features-pt2/images/image003.jpg
Notice that the "Synchronize Attributes" option will appear only if you right-click the work item icon... :?
Cheers.
Fortunately, RTC has a built-in feature called Synchronize Attributes that makes it possible to apply your changes to a defect's "shape" to previously-created work items.
The first thing to do is to create a work item query that identifies the work items to update.
Once you have created and executed your query strategy, highlight those needing the attribute to be added as shown in the following screen shot:
Notice that the "Synchronize Attributes" option will appear only if you right-click the work item icon... :?
Cheers.
Thanks sec. Currently we have a requirement - where we are changing the data type of a particular attribute from "Medium HTML" to "Large HTML". So in this case, i think we need to create a new attribute and map it back to the presentation? How can we retain the previous data after the mapping?
Thanks
Thanks
Why don't you simply change the attribute type in your process configuration?
https://jazz.net/library/content/articles/rtc/3.0/workitem-customization-attributes/images/default-value-instructions.png
See Jazz articles https://jazz.net/library/article/129 and https://jazz.net/library/article/537...
See Jazz articles https://jazz.net/library/article/129 and https://jazz.net/library/article/537...
Relating to this, i have considered the below option:
1. create a new attribute - of type large html, and add it to presentation as well.
2. export workitems. copy all the data from the old attribute to the new attribute.
3. Import the workitems.
4. Delete the old attribute.
Resynch would create both the attrbutes meaning the new attribute would be empty in the old items. and the direct change of default value to large html wouldnt work as the attribute type is medium html and hence does not produce any effect.
1. create a new attribute - of type large html, and add it to presentation as well.
2. export workitems. copy all the data from the old attribute to the new attribute.
3. Import the workitems.
4. Delete the old attribute.
Resynch would create both the attrbutes meaning the new attribute would be empty in the old items. and the direct change of default value to large html wouldnt work as the attribute type is medium html and hence does not produce any effect.
I believe that you will now have TWO workitems for each you exported/imported, and the new workitem will have a new ID. I do not think you can import OVER existing workitems..
so, you would have to archive (we are not allowed to delete in our configuration) the old workitems. and everyone would have to understand the new ids if they mattered.. ,
also export/import doesn't do a good job of saving links to other info.
so, you would have to archive (we are not allowed to delete in our configuration) the old workitems. and everyone would have to understand the new ids if they mattered.. ,
also export/import doesn't do a good job of saving links to other info.