Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How should one organise his groovy code (that is used in different post functions)

Marc De Vos [CSI - PM]
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 7, 2018

Dear,

 

We have multiple postfunctions with groovy code. Now we deploy the code everytime in every groovy function. But doing so, we duplicate code and at the end we have no overview anymore from a central place where the code is used.

How can we organise it in a better way?

1 comment

Comment

Log in or Sign up to comment
Tansu Akdeniz
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 7, 2018

Hi @Marc De Vos [CSI - PM],

You can see all scripts used in the system;

  • Go to built-in scripts
  • Script registry than RUN.

*Btw, it is always good to write your code into the .groovy file instead of putting as an inline script. Than put your files to JIRA_HOME/scripts directory and reference the path in workflow postfunction. So, you can easily manage your codes in central place.

Tansu Akdeniz

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 7, 2018

I believe the question was for JMWE. Unfortunately, JMWE for Jira Server doesn't yet support shared scripts (unlike JMWE for Jira Cloud). Please vote for JMWE-538, and don't hesitate to add a comment explaining why you need it.

TAGS
AUG Leaders

Atlassian Community Events