¿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

Warning flag when edit the issue

Using Scriptrunner can be possible set several conditions or validations in order to avoid some situations. When you want to hide some transition because some field is emtpy or wrong you can use Conditions of PostFunctions. When you want to avoid transition one issue if some field is empty or wrong you can use Validations…

Read More

Confluence waterMark with Scriptrunner

Protect your company’s information… or at least let them know it’s yours With Scriptrunner for Confluence you can create a waterMark when export to pdf is used. With this, if someone export to pdf Confluence’s page information, the export to pdf will contain information about, for example, your company and if this information is shared,…

Read More