Renaming groovy script pathnames in workflows

Hi all,

We use Script Runner for running a few groovy scripts in workflow post-functions.

I recently edited my workflows to switch from the absolute pathnames to groovy scripts we used to use, to relative ones. I now take advantage of the -Dplugin.script.roots directive.

While exporting my workflow in XML for a quick check up, I noticed two XML tags :

  • <arg name="FIELD_SCRIPT_FILE">getGroups.groovy</arg>
  • <arg name="scriptFileName">/absolute/path/to/getGroups.groovy</arg>

My worries are that the /absolute/path/to/ does not exist any more.  But I cannot edit it to reflect the content of FIELD_SCRIPT_FILE through the JIRA workflow editing interface.

My questions are: why is there two tags for (seemingly) the same thing? Why can't I edit scriptFileName? Is it safe to leave it alone? Or should I remove it through XML edit?

We use JIRA v6.3 and Script Runner v3.0.16.

 

Thanks for your answers!

1 answer

1 accepted

0 vote

IIRC scriptFileName is redundant and not used anymore. If you can see "getGroups.groovy" in the UI, without the absolute path, there's no need to worry about it. 

If you want to remove it through xml edit you can, but it's harmless to leave it. If you change the path in the UI you should see the first attribute will change in the xml, the second won't. 

Thanks for your quick reply, Jamie!

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Posted 14 hours ago in Jira

We want to know what Jira Service Desk apps you're using!

Hi Community! My name is Amir and I’m on the Jira Service Desk product marketing team at Atlassian. Our team would love to understand how you’re leveraging our ecosystem for Jira Service Desk. Wha...

38 views 0 5
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