IBM RTC 6.0.2 Is there any way to enforce a link type to make it mandatory?
Hello,
I would like to have a work item type to be enforced to have a link during the promotion of the work flow, I didn't notice any parameter easy to configure in enclipse is there any scripted way to do it?
I want to make mandatory or require a link type when the user attempt to promote the WI to the next state, I don't see how to handle the behavior of the links types.
|
2 answers
It's has been asked quite a few times before. You need to write a server side extension for it.
https://jazz.net/forum/questions/224732/mandatory-to-link-work-item https://jazz.net/forum/questions/216569/mandatory-duplicate-work-item-link-if-duplicate-resolution-is-selected https://jazz.net/forum/questions/172149/rtc-how-to-make-mandatory-the-duplicate-of-link https://jazz.net/forum/questions/213375/how-to-set-links-as-mandatory-before-saving-a-workitem |
I had the same need, and I had to develop a custom java extension (a participant) to enforce this behaviour.
I hope that these code snippets help you: // get list of links of the work item Object data = operation.getOperationData(); ISaveParameter saveParameter = null; if (data instanceof ISaveParameter) { saveParameter = (ISaveParameter) data; } IWorkItemReferences refs = saveParameter.getNewReferences(); // check if the "parent" link is present IEndPointDescriptor mandatoryLinkDesc = WorkItemEndPoints.PARENT_WORK_ITEM; // get list of links of the work item List<IReference> listReferences = refs.getReferences(mandatoryLinkDesc); if ((listReferences!=null) && (!listReferences.isEmpty())) { // mandatory link present } else { // mandatory link not present // TODO // return an error } |
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.