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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Scriptrunner Service Desk context (portal forms) web resource Edited

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 extension='js'>
    <transformer key='tracking-transformer' />
  <resource name='SetPrivate.js' type='download' location='SetPrivate.js' />

We are on:
JIRA Service Desk

Jira Software 8.5.4

Jira Core 8.5.4

Scriptrunner: 6.0.2-p5

1 answer

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Service Management

Why upgrade to Jira Service Management Premium?

We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan.  &nb...

165 views 0 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you