Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

I want to hide a request type group for users within a particular JIRA group with ScriptRunner

I have a list of users who are not to raise a particular set of request types under a request type group in the Customer Portal. As we already have ScriptRunner, I am trying to use a web resource (JS) to hide the element. However, the simple $("a:contains('Hardware')").hide() does not seem to be working =\

Tried to use a Web Panel at servicedesk.portal.footer but JS script does not appear at all either.

What am I missing? Would like to implement this without the need of any other addons. Thanks for the help!

1 answer

Hi @Jessie Chia [Information Officer] ,

Did you made any progress on that topic?

I'm under same configuration as you. Jira + Script runner. I would be interested to get control over request visibility as well.


Hi @Jean-François FORGET 

We did not manage to get far since. We did, however, tried Extension for Jira Service <strike>Desk</strike> Management which is wonderful.

Eventually, we re-routed with a "whitelist" approach. 

  • Request type remains visible
  • We hide the "Create" button from view and display a message if the user is not in a particular Jira Group. This check and hiding is done using ScriptRunner's Behaviours, printing the following javascript&colon;
    <script>jQuery('input[value=Create]').attr('disabled', 'disabled');</script>

    E.g. getFieldById("fieldOnRequestTypeScreen".setDescription("<script>jQuery('input[value=Create]').attr('disabled', 'disabled');</script>");

Hope the above might come in somehow handy for you. Will be interested if you have the solution or a neater implementation.


Like Jean-François FORGET likes this

Thanks for your prompt reply.

I never thought about injecting javascript with script runner behavior. Good to know, thanks. Even I may avoid using this kind of tricks.


The only "out of the box" feature I have is to use a script runner validator script that prevent the user to log the ticket if he his not allowed. But I can't hide the request type depending of the connected user.


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Apps & Integrations

Marketplace Partner Spotlight: AppLiger

This month the spotlight is on AppLiger. We caught up with Pavel Pavlovsky, CEO and Product Manager, to learn how the company started and what fuels the team's creativity.    Atlassian:...

379 views 0 7
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