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

Re: Running plugin code on all existing workitems

Is it possible to run the plugin code on all workitems in a project area -> to implement a particular attribute change - based on a condition?
Is there any method to retrieve all the workitems in a result and then operate on them?

Thanks.

0 votes



10 answers

Permanent link
I don't think you can do this effectively from a plugin.

maybe a java application...

but in either case many of the apis u need are not exposed publicly..

0 votes


Permanent link
You could try to synchronize all work items, as detailed in the Jazz article https://jazz.net/library/article/529:
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:
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.

0 votes


Permanent link
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

0 votes


Permanent link
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...

0 votes


Permanent link
I have not been successful at changing types via the process config source when there are existing workitems with these data elements.

the elements in the database do not change

0 votes


Permanent link
Well, I think you have to change the attribute type in the process configuration and resynch the work-item attributes... :wink:

0 votes


Permanent link
Thanks sec...I will try this out...

0 votes


Permanent link
Well, I think you have to change the attribute type in the process configuration and resynch the work-item attributes... :wink:


that was the process I was not successful at

0 votes


Permanent link
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.

0 votes


Permanent link
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.

0 votes

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,951

Question asked: May 18 '12, 11:19 a.m.

Question was seen: 6,365 times

Last updated: May 18 '12, 11:19 a.m.

Confirmation Cancel Confirm