Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Web Resource ScriptRuuner docs

Neta Elyakim
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.
June 4, 2018

Hey,

I want to submit a form like in ScriptRunner docs (Dialog) - 

https://scriptrunner.adaptavist.com/latest/jira/fragments/WebItem.html#_dialogs_advanced

To do that I need to use a web resource

https://scriptrunner.adaptavist.com/latest/jira/fragments/WebResource.html

but it's not working for me.

Can anyone help?

I add to setenv.sh file this line as is- 

JVM_REQUIRED_ARGS='-Dplugin.resource.directories=/app/home/scripts -Dother.properties...'

In my script directory -

Application Data\JIRA\scripts\resources I added a "resources" file and in there I added a JS script.

alert("test")

I reset my JIRA so the setenv.sh can be loading again.

After the restart, I tried to run the resource but I get this error:

You need to configure at least one alternate resource directory before using a web-resource, see the documentation

 

I filled the form like this:

Context(s)- jira.view.issue

Key- alert

Resources - resources/alert.js

 

Please help!

2 answers

1 accepted

0 votes
Answer accepted
Neta Elyakim
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.
June 5, 2018

The problem was that I added another line of 

JVM_REQUIRED_ARGS= 
0 votes
Alexey Matveev
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.
June 4, 2018

Hello,

Your forgot the semicolon in the alert method:

alert("test");
Neta Elyakim
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.
June 4, 2018

Hey,

Thanks but this was not the problem..

He doesn't recognize the resource at all -

"Could not find resources/alert.js in configured resource directories:"

Aaron-Lyonel Fritschi December 2, 2020

Javascript doesn't require any semicolon

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, mindful member, mindful member badge, atlassian community, community kudos, community giveaway, atlassian swag, community values, empathy and kindness, badge challenge, atlassian learning, community engagement, swag giveaway

Earn a Badge, Win a Prize 🎁

Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!

Start here
AUG Leaders

Atlassian Community Events