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

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

1 vote
Robert September 25, 2020

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events