It's all about the answers!

Ask a question

how to make IAdvisorInfoCollector display multiple added IAdvisorInfo messages?


Song Jie (364) | asked Dec 17 '16, 3:05 a.m.
 Hello, supporters
It's a server side app, and I'm writing preconditions for saving a workitem.

I'm adding multiple IAdvisorInfo objects into IAdvisorInfoCollector. However only the 1st one is displayed on the page.

For example, my code is:
protected void reportFailure(IAdvisorInfoCollector c, String summary, String description, IWorkItem wi) {
//IAdvisorInfo info = c.createProblemInfo(summary, description, "Taiping Precondition R2");
//IAdvisorInfo info = c.createProblemInfo(summary, description, this.getPreconditionName());
info.setProblemObject(wi.getItemHandle());
c.addInfo(info);
DevLog.info("Failed precondition: " + description + " \t " + this.getPreconditionName());
}

then I call the function
this.reportFailure(c,"test summary","desc1",wi);
this.reportFailure(c,"test summary","desc2",wi);
this.reportFailure(c,"test summary","desc3",wi);
this.reportFailure(c,"test summary","desc4",wi);
this.reportFailure(c,"test summary","desc5",wi);
after deployment, only 1 line, which is "summary, desc1" is displayed. so what did I miss? I'm expecting it displaying every advisoryinfo added ahead. thanks in advance.

Be the first one to answer this question!


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.