Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

ScriptRunner Escalation Service logs

Edward Greathouse April 5, 2019

Hello,

I have adaptivist ScriptRunner and would like to use "Escalation Service". I noticed that when I started testing, I was not receiving output from the logger in 'atlassian-jira.log'. So I simplified my script to just change the summary, and then log output the string "bannanas" to the log file. When I clicked on "Run Now", I see that the summary for the issues returned from the JQL were changed, but I still did not see "bannanas" in my `atlassian-jira.log` file. Do the logs print somewhere else? Here is my script:

import org.apache.log4j.Level
import org.apache.log4j.Logger


def myLog = Logger.getLogger("com.onresolve.jira.groovy")
myLog.setLevel(Level.DEBUG)

issueInputParameters.setSummary('bannanna')
issueInputParameters.setSkipScreenCheck(true)
myLog.debug("bannanas....")

 

I have see logging work behavior, post-function, and validator scripts. I am surprised they aren't working for escalation service scripts.

 

1 answer

1 accepted

0 votes
Answer accepted
PD Sheehan
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.
April 5, 2019

I've tried your exact example and it works.

Keep in mind that all the additional issue action code is executed before the updates are performed. So the log line you are looking for could have scrolled past pretty quick.

So in the case, the order of operations are:

  1. set the summary in issueInputParameter  (this is a placeholder)
  2. write to the log
  3. perform the update
    1. If action is selected, apply the transition with the issueInputParameter
    2. If action is none, update the issue with issueInputParameter
Edward Greathouse April 8, 2019

Hi Peter-Dave,

I've discovered that if I set the cron scheduler to run every minute and then click on "Update", I see the logs in the log file. When I clicked on "Run now", I would not see the logs in the log file, but I saw the summary on the issues change. 

Thank you for explaining the order of operations here. I think it's helpful so I've marked your answer as the accepted answer. 

Thanks again!

PD Sheehan
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.
April 8, 2019

In my version of Jira, it was working even with Run Now. But glad you're able to see the logs with the scheduled run. at least.

Suggest an answer

Log in or Sign up to answer