It's all about the answers!

Ask a question

How to enforce artifacts for work items


Amit Punpale (1244) | asked May 07 '13, 1:57 p.m.

Hello,

I am novice RTC user.

We are on RTC 3.0.1.1.

We are trying to create a new workflow for our team so that we can enforce certain artifacts to be attached when the task is in certain state. e.g. requirement documents before developer start working on the task, test cases and results from the business users when they give sign off.

Can someone please suggest how this can be enforced in RTC? There doesn't seem to be any custom attribute which can take attachment(s).

Any help or ideas in matter will be greatly appreciated.

Regards,

Amit

One answer



permanent link
Ralph Schoon (63.1k33646) | answered May 08 '13, 2:12 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi Amit,

as far as I can tell, there is no attribute type for attachments and you can not use the "Required Attribute" pre-condition to make them mandatory.

The only way I see would be to use a custom server pre-condition (called Advisor) for the workItemSave operation. This is a Java Server extension. Start here https://rsjazz.wordpress.com/2013/02/28/setting-up-rational-team-concert-for-api-development/ to understand what you have to do to code one up yourself.  An example advisor is here: https://rsjazz.wordpress.com/2012/11/01/restrict-delivery-of-changesets-to-workitem-types-advisordelivery-of-changesets-associated-to-wrong-work-item-types-advisor/ even if this is for the deliver operation, you can find several other examples of followup-actions that you can look up for code examples. The link above also provides an introduction into the difference of advisors and participants.

In the Advisor you would have to decide if it needs to trigger (state change - see the participant examples for the code) and then you would have to analyze the attachments. Attachments are accessed in a collaboration/list.
See https://rsjazz.wordpress.com/2012/09/21/downloading-attachments-from-work-items/ and https://rsjazz.wordpress.com/2012/08/01/uploading-attachments-to-work-items/ for examples.

Be aware that this is client code and you will have to replace the client libraries used by services you get with getService() instead of getClientLibrary(). However, I would assume you can use almost the same code on the server.


Comments
Amit Punpale commented May 08 '13, 9:37 a.m.

Hi Ralph,

Thanks for the prompt reply.

The links are quite relevant. If extension is the only way, then we would first evaluate the cost involved in creating the required extension and depending on the cost Vs benefit analysis we might go that route or adopt a softer approach.

Thank you again.

Regards,

Amit

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.