Using Script Runner Built in Scripts to add comment

I created an escalation service to add comments issues not updated for a few days. The filter works properly, however comment is not added to every issues in the result set.

What could cause this and how to fix that?
ScriptRunnerEscalationService.png

1 answer

0 vote

Hi Jozsef,

So your seeing the comment added to some issues but not others? Is there any pattern between the issues that the coment gets added to and the issues that don't?

Does the user you are running the escalation service as have permissions to update or edit the issues your expecting the comment to be added to and for every project?

Thanks,
Adam

I use this query:


updated<-5d and status!=Closed and reporter=lehocz.jozsef and assignee=lehocz.jozsef

This query results 41 issues:

JQL.png

I use the same query in the escalation service as JQL Query. If I run the service with the Run now button, then I got the followin result:

Number of issues returned by query: 41
Issue NEBIHESB-111 updated (no action defined)

JQLResult.png

The service got the same result set, as the filter, but only one of the issues is listed as updated. Unfortunately none of the issues is updated.

By the permission helper every required user access is available for the JIRA Technical User to add a comment to issue NEBIHESB-111, or to any other in the result list.

PermissionHelper.png

If I change the JQL query by removing the updated<-5d expression from the filter,


status!=Closed and reporter=lehocz.jozsef and assignee=lehocz.jozsef

the new result list will contain 59 issues, and 19 is updated by the Result tab.

JQLWithoutUpdatedResult.pngUnfortunately this is not true, because only 15 messages were sent instead of 19.

MailQueue.png

And again issue NEBIHESB-111 were listed as updated, but the update did not run against this issue, even the JIRA Technical User has all the required permission to add a comment to this issue

Jenna Davis Community Champion Aug 10, 2017

Hello,

It's a bit hard to tell what is actually happening from the lists of issues you posted. Did all 19 issues get a comment on them, then some just didn't get added to the mail queue? What are the differences (if any) between the issues that were added to your mail queue vs not? Did any of the NEDIHESB issues get updated?

Sorry for the string of questions, I just need a bit more clarification on whats happening before I can help you out. :)

Regards, 

Jenna

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

77 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you