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 fix error in panel Issues in Epic: An exception occured while rendering the web panel: com.pyxis.greenhopper.jira:greenhopper-epics-issue-web-panel (null)

Hello visitor, If you are expereincing this error: Probably exist a corrupted linked issue in this Epic. Atlassian recommneds to fix it, do operations with SQL, but that is NOT my recommendation: https://confluence.atlassian.com/jirakb/issue-screen-displays-error-rendering-greenhopper-epics-issue-web-panel-in-jira-server-779158857.html Probably the better solution is to run a little Groovy Script in Scriptrunner using the “Script Console” to run just one time!…

Read More

Create Confluence Cloud spaces from Jira Cloud Workflow Postfunction (with Scriptrunner)

First of all, create a new API Key Token: Create an API key: https://id.atlassian.com/manage/api-tokens# Combine the key with login name in base64 string, go to https://www.base64encode.org/  Format is loginname:API-key exampel: email@email.com:ABCDE12345 give result: a3Jpc3Rlci5icm9tYW5AYWR2YW5pYS5zZTpBQkNERTEyMzQ1 Combine this with the authentication type in the below case a basic so the full text is: Basic a3Jpc3Rlci5icm9tYW5AYWR2YW5pYS5zZTpBQkNERTEyMzQ1  Now we are ready to create the…

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

Remove projects!

Hello, we are in migration time… Jira has shaken us with its policy changes and many of us may have to migrate to other instances or services with less users or split projects between instances. Sometimes, migration time is time for clean our database…if you want to remove some projects with an automation, the following…

Read More