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.