Set Due Date (or Date-Time customfield) in Jira Cloud using Postfunction of Scriptrunner (Part II: Working days)

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 More

Flags Messages in Jira

Sometimes is difficult to extract this info, here the documentation and examples: Link to the documentation Name Type Default Description title String The title text of the flag. body String The body text of the flag. type String info Sets the type of the message. Valid options are “info“, “success“, “warning” and “error“. close String…

Read More

How 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 More

How 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 More

BigPicture 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 More

Working 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 More

ScriptRunner 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