We are in “migrations” times, and this script probably will be useful to “repeat” failed “Project Importations” in Jira Server & Datacenter. To reset Versions & Components in a target project we can use a script in Groovy for Scriptrunner in order to run it in the Script Console. IMPORTANT: Remember to change the Key…
Read MoreExample of Jira Validator using Groovy and Scriptrunner to check the users fields are different members
Here a little example of how to validate 3 user fields to check they have different members selected. This example works in Jira Server & Datacenter with Scriptrunner or MyGroovy Apps. Note: InvalidInputException must be raised to “Stop” the Transition. By MrAddon .
Read MoreJIRA Scriptrunner REST Endpoint to Clone project
First of all, please remember How to create and invoke a new REST Endpoint in Jira: JIRA Scriptrunner REST Endpoint & Web Fragment example In this exercise we will create a REST Endpoint in our Jira using Scriptrunner plugin to clone an existing project. The REST endpoint in this case accept two params: project_key and…
Read MorePredictable dropdown fields in Jira with Scriptrunner
This exercise is the continuation of: How to create a Jira custom field with options from an external REST API In this case, instead of use an external REST API to obtain the values of the dropdown, we want to use a static list of values. We will use the same approach than the other…
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 MoreHow to create a description template based on a Jira ticket (Part II)
This post is the continuation of: How to set a default description template in your Jira tickets. Now in the second part of the post we want the same thing, but not “hardcoded”. We want to create new tickets based on a description of an existing Jira ticket (and we will use this kind of…
Read MoreHow to remove options from the Jira Server menu header with Scriptrunner
Other similar examples: How to remove the CLONE option in JIRA Projects In this example we want to disable some option of the Jira Server header For example, the “Power Apps” option. To do this exercise, we need to have installed Adaptavist Scriptrunner, because we need to create a new “Script Fragment” After this, we…
Read MoreRecurring Tasks in Jira with Scriptrunner
Sometimes we need to create new tickets in Jira programmatically each first of month… (yes, in other words, we will create a recurring task each month) and a scheduled process stored in Jira is called “Service”. With Adaptavist Scriptrunner or MyGroovy plugins for Jira Server and a little groovy script we can create programmatically complex…
Read MoreJQL Trick: How to search for labels with a wildcard expression in Jira Server
If your company has installed Adaptavist Scriptrunner you are in luck! You are available to do a search for labels using a wildcard expression using JQL You can use the JQL function issueFieldMatch Example of usage: issueFunction in issueFieldMatch(“project = JRA”, “labels”, “ie[8|9]”) This will search for tickets with “ie8” and “ie9” labels issueFunction in…
Read MoreHow to fix the Jira Error: No permission scheme is associated with project ‘XXXX’
If you have deleted a project in Jira Server, and your log are exploiting with lines with this “error“: You can fix it using Adaptavist Scriptrunner. Launching (and modifying) this Groovy code: By MrAddon
Read More