Hello
I am trying to restrict issues types available when user clicks the "create issue in epic" button from an Epic. The behaviour is on the create screen and if I try
log.debug("actionName=" + actionName) ... I get "Create"
log.debug("underlyingIssue.parentObject=" + underlyingIssue.parentObject) .. I get "null"
any ideas ?
Cheers in advance. Luka
Hello Luka,
To achieve your requirement, I believe you should retrieve the issue type on the create screen.
Here's the sample script:
if (getActionName() in ['Create Issue', 'Create']) {
def issueTypeName = getIssueContext().issueType.name
if(issueTypeName == 'Epic'){ //if it's epic
//your code
}
}
May I know is this what you are asking for?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks for the fast reply!
what I am trying to do is: find a way to check if the create screen has been triggered by the "create issue in epic" action in an epic. ( and if it has then limit the issuetypes available)
If you click the "create issue in epic" action in an epic it will open up a create issue screen and set the issue type to the last issuetype you created .. it could be epic or issue or bug or whatever you created last. So checking issueTypeName == 'Epic' will not help :-(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.