It's all about the answers!

Ask a question

How to create a new work item based on the value of an attribute?


Susan Hanson (1.6k2201194) | asked Jun 07 '13, 7:55 a.m.
I've gotten this request from my team:

We have a "Story" work item, and we have a set of custom attributes (Yes/No fields).  They have asked that If the value of one of these custom attributes is changed from No to Yes, that RTC automatically creates a new Task work item, sets the Parent of this newly-generated task to the Story work item that contains the custom attribute that was changed to Yes.  In addition, they want to only generate this new Task work item if it has not already been generated once (for example, changed no->yes (task generated), changed yes -> No (and canceled task) and then no -> yes (if task is canceled, then reopen the existing one.).

Is this at all possible? Anybody have experience doing this already?
Susan

2 answers



permanent link
Indradri Basu (1.8k1514) | answered Jun 07 '13, 8:36 a.m.
Hi Susan, I am just stating my thoughts based on my understanding...
I am not aware if it is possible to triggering a workitem creation on a value change of an attribute and it may not be a good idea either considering if you select a wrong value than desired.
You may know already that this could be possible on a save operation by writing a custom plugin. You may also write an application using plain java client APIs which may search the workitems and when a particular condition is satisfied it will trigger a workitem creation, but I think the drawback of this process is that the program either needs to be trigger manually or scheduled.
You may want to look at the wiki on Programatic creation of workitems to explore more.

permanent link
sam detweiler (12.5k6195201) | answered Jun 07 '13, 9:51 a.m.
there is nothing 'out of the box' to do this..

but you could create an extension (participant) to accomplish these tasks.

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.