It's all about the answers!

Ask a question

WorkItem(say Problem) should not be set to "Set done "state when it doesnt have the " Tracks " links(Every Problem should have a defect associated with it, before closing it)


Shwetha G (5016) | asked Dec 07 '16, 11:30 p.m.
Whenever I set a WorkItem(say Problem), to "Set done" state, there should be a calculated script that checks whether the problem is having a "Tracks" Link associated. If not present, then it should not allow the user to close the problem. (In short : Every Problem should have a defect associated with it, before closing it)

Are there any solutions for this ?

Currently I am trying out this steps:

1. have a hidden field in the Problem.
2. Have a calculated script that contains a oslc uri, that hits the RTC server and fetches all the "tracks " WI, it will return a xml containing all the WI along with count of how many WI linked.
3. In the calculated script, I will use a regular expression to get the counts of linked items returned. If it return zero
then no WI linked to that problem, so that value should be passed to the hidden field.
4. when the user is selecting the "set done" state, it should check this hidden field value, if it is set to 1 then it should allow the user to "set done" else restrict.

Is this the correct approach, else please suggest me the better approach to access the "Links" of a WI.


I am struck with this following steps :( could you please help me with this.

1. Is there any way I can access the links to a particulr workItem eg... "Contributes to", "Tracks" etc..from dojo ?
2. Can I use REST/OSLC URIs in DOJO to check the "Links" of a WI.

Accepted answer


permanent link
Ralph Schoon (57.7k23642) | answered Dec 08 '16, 4:14 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
 You will have to write a Java Server precondition/advisor to ensure this rule. See https://rsjazz.wordpress.com/2014/05/26/only-owner-can-close-workitem-advisor/ for an example and hints where to start.
Shwetha G selected this answer as the correct answer

Your answer


Register or to post your answer.