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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • 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

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.

JF

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.

Regards,
Jessie

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.

Jeff

Suggest an answer

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

How to log work and track time in Jira when a person is part of multiple teams

  The manager’s daily activities include a list of challenges to reach high levels of efficiency for their teams. Part of these challenges is related to how to deal with the worklog systems sin...

111 views 2 2
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