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

0 votes

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.

(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=""&gt;com.onresolve.jira.groovy.GroovyFunctionPlugin&lt;/arg&gt;
              &lt;arg name="FIELD_SCRIPT_FILE"&gt;YCFgY29tL3JhZGJlZS9wb3N0ZnVuY3Rpb25zL0FwcHJvdmFsX2hvbGRfcG9zdGZ1bmN0aW9uLmdyb292eQ==&lt;/arg&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 -

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:

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

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,118 views 13 19
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot