Using Script Runner Built in Scripts to add comment

Jozsef Lehocz August 1, 2017

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 votes
adammarkham
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.
August 1, 2017

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

Jozsef Lehocz August 2, 2017

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

Jozsef Lehocz August 2, 2017

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
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.
August 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
TAGS
AUG Leaders

Atlassian Community Events