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

Scriptrunner Script Fragments to hide the "Add flag" & "Remove Flag" options on Agile boards

Hi, can the Script Fragments functionality in ScriptRunner be used to hide the "Add flag" & "Remove Flag" options on Agile boards for 1 project?

 

image2016-9-27 16:43:55.png

I've used the Script Fragements to hide other UI elements but cannot seem to do it for this particular scenario

The reason for this is we are programatically setting/removing the flag based on other field entries, i.e. forcing the user to add a comment as to why they are flagging/unflagging the issue.

 

Any help is greatly appreciated.

 

Thanks,

Conor

1 answer

You can only remove UI items if they are shipped in the plugin as a <web-item>, <web-section> etc etc.

Unfortunately JIRA Agile does not play the game.

You can do it by injecting some javascript using Script Fragments -> Install web resource - but it's not as easy.

The context is "gh-rapid".

Hide the flag using:

AJS.$("#ghx-issue-ctx-action-flag-toggle-container").remove()

Get the current issue using: 

JIRA.Issue.getIssueKey()

There may be more to it than I've said above... I have not tried this.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Opsgenie

Investigate deployment-related incidents with Bamboo and Opsgenie together

Back in April of last year one of the major product announcements from Opsgenie was the launch of the Incident investigation view which created a deep connection between Bitbucket and Opsgenie, empow...

149 views 1 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