I see that on issue creation I can create an automation action of type "Edit issue" to *apply* labels, but I would also like to be able to *remove* labels. Is there a way to do that?
I would greatly prefer a method that does not require plugins, but if plugins are the only way, which ever is the most stable, least upgrade-affecting plugin would be preferred.
Hello @Justin Warwick,
No need of other add-on's. To remove the labels, you just need to leave the value field as empty and save the changes. See screenshot below :
Thanks,
Swathi
Thank you, Swathi, that worked for my current situation (where we just wanted to remove the issue collector label on the way in). As a further clarification, though: there is no way to remove specific labels, leaving others in place. Our only choice, by this method, is to remove all labels all at once. Is that correct?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Justin Warwick,
Yes, that's correct... unfortunately ;)
I know another way to implement this using add-on. Just in case if you are interested, you can try this.
Use script runner post function (custom script) in workflow transition. See the script below :
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.label.LabelManager def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
LabelManager labelManager = ComponentAccessor.getComponent(LabelManager) def labels = labelManager.getLabels(issue.id).collect{it.getLabel()} labels -= 'labelToBeRemoved' labelManager.setLabels(user,issue.id,labels.toSet(),false,false)
Regards,
Swathi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Excellent, thank you, Swathi. This makes for a very complete answer and is very helpful. Cheers!
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.