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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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
4,560,415
Community Members
 
Community Events
185
Community Groups

How to hide "Create Project" menu item with Fragments?

I need to have the "Create Projects" menu item visible to only a specific group.

  • Using Hide system or plugin UI element
  • Can locate the element via fragment locator and add to Hide what:
    com.onresolve.jira.groovy.groovyrunner:sr-generated-browse_link/project_new
  • I disable fragment locator and the element disappears from Hide what and I can't find it anymore
  • Enable fragment locator and it's back
  • Menu item is never hidden

What's going on?

1 answer

1 accepted

0 votes
Answer accepted
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 09, 2023

When you enabled fragment locator, scriptrunner generates a bunch of fragments for all the various locations where new web-items could be insrted.

So what you've attempted to hide is one of those dynamically generated fragment.

Web-items can't be identified with the fragment locator. Only sections and panels.

What you want to hide are these two:

  • jira.webfragments.browse.project.links:create_project > hides the button on the "view all projects page"
  • com.atlassian.jira.project-templates-plugin:project_template_create_link > hides the menu item "create project" in the Projects menu

There is no easy way to identify a web item's key even using the fragment locator. 
You just have to filter with something useful (like create or project) and scan through the list and try likely candidates until you find the one you like/want.

That did it, thank you

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events