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

how can I create a button with only few issue types

how can I hide some issue type in the button what created by scriptrunner.
I need to keep only sub-bug and test types.

Script fragments 


Link

/secure/CreateSubTaskIssue!default.jspa?parentIssueId=${issue.id}&issuetype=10003 - only one type

/secure/CreateSubTaskIssue!default.jspa?parentIssueId=${issue.id} - all issue types

1 answer

0 votes
Moses Thomas Community Leader Nov 27, 2020

@Виктория   For sure you can do it with the Behaviors from the script runner plugin

please see similar question here  with sample code, if you have problem you can paste your code here

https://community.atlassian.com/t5/Jira-questions/Hide-Issue-Types-from-Jira-Create-Issue-Screen/qaq-p/977924

 

Kind regards,

Moses.

@Moses Thomas Its not working with the "button", what was created by fragments by the same Scriptrunner.

Screen Shot 2020-11-26 at 13.44.28.png

@Moses Thomas 
by this condition I can hide this button from the customer role. but it works in all projects, I need hide it in only two of them. Help me please with the script

Screen Shot 2020-11-30 at 14.51.01.png

Moses Thomas Community Leader Dec 08, 2020

@Виктория   In your code you are not checking  the projects, before restricting it  to the customer role. Try this.



if (issueContext.projectObject.name == 'A' || issueContext.projectObject.name == 'B')
{

!projectRoleManager.isUserInProjectRole(currentUser,CustProjectRole,issue.getProjectObject())

}

 Kind regards,

Moses

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Jira Software

Presenting the "Best of 2020" Jira Software roundup!

Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...

7,071 views 8 28
Join discussion

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