Physical address to paste a custom jql function "newScript.groovy"?

zaharovvv_suek_ru
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 9, 2019

All custom JQL scripts are deleted after adding custom script

I would like to create a custom JQL script. So I've done:
1. I've created a file "newScript.groovy"
2. Then I've pasted "newScript.groovy" file into home directory:
C:\Program Files\Atlassian\Application Data\JIRA\scripts
3. Clicked a `scan` button at the `JQL Functions` tab:

scan button.png

4. After clicking a `scan` button, no new script such as "newScript.groovy" is added
5. I started googling as new script is NOT added. And the next link was found
https://community.atlassian.com/t5/Marketplace-Apps-questions/What-is-the-path-for-a-Scripted-JQL-Function-groovy-script/qaq-p/850587
So I've decided to change address
C:\Program Files\Atlassian\Application Data\JIRA\scripts\com\onresolve\jira\groovy\jql\

6. And then all scripts are removed:

No JQL Functions.png


My question are
1. What is correct address to paste a file "newScript.groovy"?
2. How is it possible to restore all JQL custom scrips?

2 answers

1 vote
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 9, 2019

I haven't worked with a windows installation, but that location seems right.

I would guess that your new script is breaking something and it's stopping all the other functions from loading.

Try removing your script then re-scanning. I believe the other custom JQL will return.

Then, review your atlassian-jira.log for errors around the time that you attempted to load your custom script.

0 votes
zaharovvv_suek_ru
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 10, 2019

I disabled ScriptRunner and then enabled ScriptRunner and all JQL scripts are returned. Thanks! However, it is really interesting where to put custom scripts without losing existing scripts.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events