Renaming scripts

I have just renamed the path of a groovy script.  I have dumped the workflow configs to check I have got all instances and notice this entry where I have renamed.  How can i update the scriptFileName?  Or don't I need to bother?

<arg name="FIELD_SCRIPT_FILE">/app/localstorage/jira_home/groovy-scripts/emm-ready-for-qa.groovy</arg>
<arg name="scriptFileName">/sbclocal/apps/jira_home/groovy-scripts/emm-ready-for-qa.groovy</arg>

1 answer

Hey Roy... did you check my answer to your other question? You are allowed to give feedback to answers wink

It really depends what version of Script Runner and JIRA you are using. It's always advisable to use relative paths for this reason, or script roots in version 3 of the plugin.

If you have just a few you can edit the workflows in the normal way, and update the paths.

Rina Nir Solutions Partner Jul 04, 2016

(on JIRA 7.1.2, ScriptRunner  4.3.4)

As also need to review paths in the exported workflow xml (and possibly ammend and reimport), but in the exported xml the post function parameters are 'encripted':

&lt;function type="class"&gt;
              &lt;arg name="FIELD_FUNCTION_ID"&gt;YCFgMTQzYWFmMGZmODgxYWJkNzE0NGE1NjA0MTIyZGJmMDIyZjhlMjZjNQ==&lt;/arg&gt;
              &lt;arg name="full.module.key"&gt;com.onresolve.jira.groovy.groovyrunnerrungroovy-function&lt;/arg&gt;
              &lt;arg name="FIELD_INLINE_SCRIPT"&gt;&lt;/arg&gt;
              &lt;arg name="canned-script"&gt;YCFgY29tLm9ucmVzb2x2ZS5zY3JpcHRydW5uZXIuY2FubmVkLmppcmEud29ya2Zsb3cucG9zdGZ1bmN0aW9ucy5DdXN0b21TY3JpcHRGdW5jdGlvbg==&lt;/arg&gt;
              &lt;arg name="class.name"&gt;com.onresolve.jira.groovy.GroovyFunctionPlugin&lt;/arg&gt;
              &lt;arg name="FIELD_SCRIPT_FILE"&gt;YCFgY29tL3JhZGJlZS9wb3N0ZnVuY3Rpb25zL0FwcHJvdmFsX2hvbGRfcG9zdGZ1bmN0aW9uLmdyb292eQ==&lt;/arg&gt;
            &lt;/function&gt;

Is there a way to cause the export to export/import the actual path name in 'FIELD_SCRIPT_FILE'?

 

(PS: the scripts are packaged as a plugin)

They are not encrypted but they are encoded - https://scriptrunner.adaptavist.com/4.3.3/jira/releases/current-release.html#_base64_encoding_for_workflow_function_arguments

You can decode them... it doesn't matter if the args are encoded or not in the workflow.

It's true that some of the args don't need to be encoded and it would be clearer if they were not: https://productsupport.adaptavist.com/browse/SRJIRA-1965

Rina Nir Solutions Partner Jul 04, 2016

Thanks, have voted for the issue, your input will help me workaround this obstacle.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,397 views 15 19
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you