I am trying to hide "Create Branch" from the development panel of a jira issue ticket for the tickets which are already in Closed Status.
I am using "Hide System or plugin UI element", with the following fields
Hide what: com.atlassian.jira.plugins.jira-development-integration-plugin:devstatus.cta.createbranch
Condition:
jiraHelper.project?.key != "IFEL"
issue.getStatus().getStatusCategory() == "Closed"
But this is getting implemented in all the projects with Done status. Some how the conditional operators also dont work when I use "&&" or "&" between the two conditions.
I would like for it to only work for "IFEL" project and for issues with status "Closed". How do I acheive this.
Could you please try below code?
!issue.getProjectObject().getKey().equals("IFEL") && issue.getStatus().getName().equals("Closed")
Do not forget the not (!) operator in the beginning of the line. I'm assuming you want to run this for the projects except IFEL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for the answer, I would like for it to only work for the project "IFEL" and for issues with status "Closed" in the project IFEL.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So, exclude (!) and use the script.
Or you can restrict the behaviour for IFEL project and only use below part. That should work.
issue.getStatus().getName().equals("Closed")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if I exclude (!) or include(!), it is making sure that create branch is hidden for all the projects.
In your previous reply you mentioned that we can restrict it to a specific project, How do we do that? can we assign the script fragment in any of the project settings?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To hide create branch on a project when the status of the issue is "Closed" worked with below
Hide what: com.atlassian.jira.plugins.jira-development-integration-plugin:devstatus.cta.createbranch
Condition:
! (jiraHelper.project?.key in ["IFEL"])
! (issue.getStatus().getName().equals("Closed"))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.