PostFunction to set Date-Time custom field with Groovy Script Runner
New JQL Function Custom to retrive issues with inactive user in assignee “HasInactiveAssignee” or in reporter “HasInactiveReporter” (Jira 6 and 7)
On {JIRA_GOME}/scripts/ create this folders: For example: ../jira_home/scripts/com/onresolve/jira/groovy/jql Then add the groovy file with the new JQLFunction, exmaple: HasInactiveAssignee.groovy The code: Then Go to Addons –> ScriptRunner –> Script JQL Functions –> and then press “Scan” Syntax: issueFunction in hasInactiveAssignee(‘project = XXX’) That’s all!
Read MoreHow to add new custom JQL Function with ScriptRunner
On {JIRA_GOME}/scripts/ create this folders: For example: ../jira_home/scripts/com/onresolve/jira/groovy/jql Then add the groovy file with the new JQLFunction, exmaple: ABC.groovy Then Go to Addons –> ScriptRunner –> Script JQL Functions –> and then press “Scan” That’s all!
Read MoreAutoincrement value of a custom field in a PostFunction Groovy ScriptRunner script
Listener “When Moved tickets to the target Project, assign new project leader and new initial status” with Groovy ScriptRunner
JIRA Service with Groovy ScriptRunner “Closing issues with status X with N days without updates” usign JQL
Configure Groovy ScriptRunner Logs
Loggin Scripts You can get a long with way with logging statements, which you can do by adjusting the log level, and “tailing” your log file, normally atlassian-jira.log (usually located in the path {JIRA_HOME}/log ). Add the following lines to your log4j.properties (usually located in the path {TOMCAT_ROOT}/webapps/ROOT/WEB-INF/classes): If your script fails for some reason…
Read MoreIssue Index Corrupted / Reindexing by Groovy ScriptRunner
Go to JIRA > Add-ons > Script Runner > Script Console Copy the script contents, replace “PUT_KEY_OF_ISSUE” and press Run This code correct problems with issues that don’t shows the status correct in views, etc.
Read MoreHow to create a new Service with Groovy ScriptRunner
Go to JIRA > System > Advanced > Services Name: “HelloService” for example Class (always): com.onresolve.jira.groovy.GroovyService Delay (n): in minutes input-file: {JIRA_HOME}/scripts/example/HelloService.groovy Then copy the script content to this path {JIRA_HOME}/scripts/example/HelloService.groovy Then every n minutes you can see in the “atlassian-jira.log” the traces: 2015-05-22 13:37:13,152 atlassian-scheduler-quartz1.clustered_Worker-1 INFO ServiceRunner HelloService [onresolve.jira.groovy.GroovyService] groovyService.run 2015-05-22 13:37:13,157 atlassian-scheduler-quartz1.clustered_Worker-1 DEBUG ServiceRunner…
Read MoreHow to create a new Listener with Groovy ScriptRunner
Create a new file named Example.groovy Copy the file in the JIRA server, path {JIRA_HOME}/scripts/{package}/Example.groovy NOTE: if the script contains “package example.Example” {package} must be “example” in this case Then define the Custom Listener in JIRA > Add-ons > ScriptRunner Listeners In Note: put general Information, for example “MyFirstListener Example” In Project Key: put all the…
Read More




