Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

in a Behaviour how can I know if create screen triggered by "create issue in epic" action/button

luka montin January 15, 2021

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

 

 

 

 

1 answer

0 votes
Lih Yao Tiong
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 15, 2021

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?

luka montin January 15, 2021

tbd

luka montin January 15, 2021

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 :-( 

Suggest an answer

Log in or Sign up to answer