How to automatically assign a task to the previous assignee when the reporter wrote a comment?

Helen Porter December 18, 2020

Hi,

When we ask a question to the author in the comments of a task, we assign it to the author and change the status to "Hold". If the author writes a response, we need the status of the task to automatically change to "In Progress" and the task to be assigned to the previous assignee.
How can I configure automation using a sil-script?
We already have a script configured. But how do I configure the script to run when a comment is posted to a task?

JComment cmt = getLastComment(key);
string rep = reporter;
string authorComm=cmt["author"];
if(contains(authorComm,rep)){
   string [] h = fieldHistory(key, "assignee");
   string a;
   if(isNotNull(h[1])) {
      a = h[1];
   }
   else {
      a = h[3];
   }
   assignee = a;
   autotransition(521,key);
}

2 answers

0 votes
Tansu Akdeniz
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 21, 2020

Hi @Helen Porter 

As @KAGITHALA BABU ANVESH suggested, you can use automation.

  • If you have JMWE, JSU etc, go to workflow and find the transition to "On Hold" status. Copy current user to newly created customfield (user picker type). So that, issue will store the action user in customfield.
  • Go to project settings -> automation. When issue commented -> if initiator is reporter -> If status is "On Hold" -> transition issue to "In Progress". 
  • You can either set assignee to previous user in automation or in "On Hold" to "In Progress" transition post-function (by copying the field).
Helen Porter December 21, 2020

Hi,
As I understand it, there is automation in service desk projects. We have a software project. I did not find automation in it.
In addition, we need to run the script when adding a comment, but not during the transition. Tried it via SIL Listeners, but nothing worked. Can I run the script when adding a comment? In theory, this is considered a task update and should have worked.

0 votes
KAGITHALA BABU ANVESH
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 18, 2020

I Think it's Jira service management kind of activity,

May be you can achieve this by using "Automation" or "Scripting"

Suggest an answer

Log in or Sign up to answer