Resolve comment on status transition

Description
Tzoma
Posts: 3
Joined: Thu Oct 20, 2016 7:23 pm

Resolve comment on status transition

Postby Tzoma » Thu Feb 23, 2017 8:49 pm

Hello,

I have configured the workflow so that when my workitem reaches a certain status, i can run a script that would automatically resolve all comments in that workitem.

This is my script below

Code: Select all

var workitem = workflowContext.getTarget();
var unresolved = workitem.getComments(false);
var iterator = unresolved.iterator();
   
while (iterator.hasNext())
{
   var comment = iter.hasNext();
   if (!comment.isResolvedComment())
   {
      comment.getRootComment().setResolvedComment(true);
   }
}

workitem.save();


The problem is that when i select the transition " Perform action Resolve Comments " that i have setup for this script, nothing happens.

Any thoughts ? Or maybe any other approach to solving comments ( even in bulk ) ?

Thanks for your help !
:)

Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 7 guests