The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Scriptrunner Service Desk context (portal forms) web resource

Robert
September 23, 2020

I've created a small JavaScript file to hide the "Organization" option on Servicedesk portal forms. I've read up on the issue and seen that I should add the context "consumerPortal" and that is a problem as it doesn't exist in the list of context(s). 

So I selected come.atlassian.servicedesk.application.about instead (and i've tried a few others) but my JavaScript doesn't appear to be running anywhere. When I hit preview I get the XML context and when I hit Add I get sent back to the script runner fragments page but the web resource I just added is nowhere to be found. 

Below is the XML I get back from preview.

So how do I set the correct context to get this to run on service desk forms? Can I edit this XML somewhere after adding the fragment? 

Will register the following XML:

<web-resource key='consumerPortal' name='ScriptRunner generated web resource - consumerPortal'>
  <transformation extension='css'>
    <transformer key='tracking-transformer' />
  </transformation>
  <transformation extension='js'>
    <transformer key='tracking-transformer' />
  </transformation>
  <resource name='SetPrivate.js' type='download' location='SetPrivate.js' />
  <context>com.atlassian.servicedesk.application:about</context>
</web-resource>

We are on:
JIRA Service Desk
 4.5.4

Jira Software 8.5.4

Jira Core 8.5.4

Scriptrunner: 6.0.2-p5

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Robert
September 25, 2020

The correct context was customerPortal not consumerPortal this resolved the issue.

TAGS
AUG Leaders

Atlassian Community Events