It's all about the answers!

Ask a question

Children Linking Order in Operation Advisor.


Arun Batra (14612427) | asked Jan 16 '17, 3:21 a.m.
reverted Jan 16 '17, 3:24 a.m.

 When linking child work items in an operation advisor, the list of children as seen from the parent links view is in a random order, even if the work items are being linked sequentially.

e.g. 
What could be the issue?

The code used is this.
for (IWorkItem child : children) {
System.out.println("");
IWorkItemReferences references = saveParameter.getNewReferences();
List<IReference> allrefs = references.getReferences(WorkItemEndPoints.CHILD_WORK_ITEMS);
for (IReference iReference : allrefs) {
System.out.println(iReference.getLink() +" : "+ iReference.getComment());
}
workItemService.saveWorkItem2(child, null, null);
System.out.println(child.getId());
IReference newReference = IReferenceFactory.INSTANCE.createReferenceToItem(child,child.getHTMLSummary().getPlainText());
   references.add(WorkItemEndPoints.CHILD_WORK_ITEMS, newReference);
   
}


When using the SYSOUT, the order is correctly displayed in the console. Just RTC is showing it as shown in the screen shot. Please Advise.

One answer



permanent link
Ralph Schoon (63.1k33645) | answered Jan 16 '17, 3:26 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jan 16 '17, 3:29 a.m.

If you perform changes to a work item in an advisor you likely violate the interface. see https://rsjazz.wordpress.com/2012/12/14/do-not-modify-the-triggering-element-in-an-operationadvisor/ . An advisor basically only advises e.g. prevents a save.

The order of elements in whatever list and the order of how they are displayed by a user interface are not necessarily the same. For example you get alphabetical order in some places.

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.