Hi, I'm fairly new at this. There seem to be a variety of approaches - some guidance as to what would be best would very helpful.
This is for a plugin we are developing. We have two custom issue types, A and B (a subtask).
A will only have subtasks of type B. Equally, type B subtasks will only be able to have a parent of type A.
I would like us to be able to restrict the creation of subtasks, to achieve this.
Preferably, in the Create Subtask Issue Type dropdown, I would like to get rid of all other choices.
However, if I have to use validation, then a message telling the user to pick another type, this would be OK.
Has anyone got some thoughts on the best way to achieve this?
Many thanks.
Community moderators have prevented the ability to post new answers.
See https://jira.atlassian.com/browse/JRA-7990, where Denis Yaparov has provided a nice solution via (script runner) simple validation on Create issue transition's validator event
This simple scripted validator on Create transition in sub-issue workflow could do required check:
["Task", "Bug"].contains(issue.parentObject?.issueTypeObject.name)
You can certainly do that with a validator like Conditioned validator from Update on Transition for JIRA. It would just give a use message when something you don't want was tried. It doesn't prevent the option from showing up.
I suspect there may be easier or more complete ways to do this, but I don't know off hand.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that - this is going into a plugin for the marketplace, so we really need it to be in code, with the minimum of dependencies.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh, sorry, I missed that in my reading. I don't really have a suggestion then.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I should have made that clearer - thanks for responding though.
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.