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

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)

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.

0 votes


Accepted answer

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

1 vote

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
× 7,495
× 6,121

Question asked: Dec 07 '16, 11:30 p.m.

Question was seen: 1,719 times

Last updated: Dec 08 '16, 4:14 a.m.

Confirmation Cancel Confirm