This post is the continuation of: Set Due Date in Jira Cloud using Postfunction of Scriptrunner To evolve the script, to put for example Working days instead of natural days, when setting a due date can be somewhat difficult using Scriptrunner for Jira Cloud, the reason is that we cannot use “while” loops, we must optimize…
Read More¿How to store and access configuration data in Jira for Groovy Scripts?
1. Place a file with name credentials.properties Under <script_root> : app.url=http://example.com app.user=myuser app.password=secret 2. Create an Accessor class in <script_root>/mycompany/MyCompanyProperties.groovy: package mycompany import com.onresolve.scriptrunner.runner.ScriptRunner import com.onresolve.scriptrunner.runner.ScriptRunnerImpl import java.nio.file.Files import java.io.File import groovy.util.logging.Log4j @Singleton @Log4j public class MyCompanyProperties { final String configFileName = ‘credentials.properties’ public Properties getProperties() { def scriptRoots = ScriptRunnerImpl.getPluginComponent(ScriptRunner).getRootsForDisplay()?.split(“, “)?.toList()…
Read MoreHow to hide options of a customfield depending on the IssueType
We can use Behaviours in order to hide options of a customfield/dropdown in Jira depending of the value of the IssueType. If you are new I recommend first to do this example: Show/Hide Mandatory fields in Jira dynamically with Behaviours Behaviours is part of the Scriptrunner plugin of Adaptavist. In this example we will observe two…
Read MoreHow to get a list of Statuses of Jira with Groovy
A simple script to obtain a list of the names of the statuses of your Jira By MrAddon
Read MoreDatabase custom fields in Jira with Scriptrunner
In this exercise, we want to show a custom field with database values in our Jira Server with Scriptrunner installed. First of all, we need to go to “Resources” section And create a Database connector, in this exercise will be a connector to the jiradb itself (then is a Local database connection). Here an example…
Read MoreHow to create a Jira custom field with options from an external REST API
To do this exercise, we will use the famous plugin for Jira called Adaptavist Scriptrunner. First step, we need to create a REST Endpoint in our Jira Server. This REST Endpoint will query the external REST API to obtain the values and options (In this example we will query GitHub to obtain a list of…
Read MoreHow to create a Jira Server script field to show in all parent ticket the SUM of some customfield of all subtasks
In this exercise we want to create a new custom field of type Scriptfield of Scriptrunner Jira plugin. This script field will sum all the values of some customfield of its subtasks. Just go to Add-ons –> Scriptrunner –> Script Fields and create a new Script field like this (Total…): Now place a script like…
Read MoreBigPicture with BigTemplate super fusion for Jira
This post is the continuation of: BigPicture and NewStatusColorsPRO for Project Management in JIRA In this post we want to show: BigPicture Jira Dashboard gadgets Export from BigPicture using BigTemplate Jira plugin How to change the BigTemplate “templates” Other config params of BigPicture If you need a control panel to track your Programs, we explain…
Read MoreWorking with Panels in the Jira Issue View
In this post we want to show how to change some parts of the web panels of the Jira Issue View context. We can start changing the default global settings of Jira (in the Advanced section). We can change the jira.table.cols.subtasks variable to add more fields to the web panel, also with the variable jira.view.issue.links.sort.order we…
Read MoreExample of script field to see the Keys of the linked issues
In this example, we will see in a script field all the tickets linked that uses a link type “Trigger” relation That’s all! By MrAddon
Read MoreScriptRunner for Jira – Script Fields trick to use Common Classes
For a large scripts exist a trick to reduce the complexity of the Script Fields if you use classes that can be “common” and reused between other Script Fields. For example, imagine we want to create a Script field that show a report HTML inside the tickets with the Lean metrics. Something like this: And…
Read More