Is it possible to restrict epic under epic issuetype?

Prashant Mali May 3, 2021

Hello Team,

When using the "+" button to create an issue under an epic in the Jira project, it is allowing to create Epic issue type. 

Jira allows to select the "Epic" issue type when creating an issue under an Epic. For the "normal" issue types everything is fine/as expected. Is there a way to hide the Epic issue type in the "Create issue in epic" dialog under Epic?

 

3 answers

0 votes
Daniel Ebers
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.
May 9, 2021

Hi @Prashant Mali

testing on my Jira I seem to understand you can create more Epics linked to the original one (the one you are likely referring to). An Epic under an Epic not possible in that specific means but you can link two together.

I could not wrap my head around the limitation you are after, look, the creation of a second Epic could be something that is not wanted (projects often contain more than one Epic).

With the '+'-sign you can establish an Issue Link to another issue. That indeed is just linking, not creating an issue.

Assuming you are referring to Epic-Panel by clicking on "Create issue in epic" a new Epic will by created. However, this newly created Epic is not living  "within another Epic", also not linked to another Epic.

grafik.png

Happy if you could provide a screenshot or elaborate further if this was not what you meant.

Regards,
Daniel

Prashant Mali May 13, 2021

hi @Daniel Ebers ,

I have added screen in my other comment. basically use case is, when we create issue in Epic, it is allowing us to create Epic issue. It is not impacting anything because it will create separate Epic but Ideally it should show other issue types only Task, Story etc than Epic.

Hope you understand my requirement.

Thanks,

Prashant

0 votes
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 4, 2021

Yes, generally the instructions  for adjusting the issue types using scriptrunner behaviour are here: in https://docs.adaptavist.com/sr4js/latest/features/behaviours/behaviours-examples/restricting-issue-types

But we can simplify the example and wrap the logic in a block to check that the Epic Link field is populated.

Something like this

import com.atlassian.jira.component.ComponentAccessor
import static com.atlassian.jira.issue.IssueFieldConstants.ISSUE_TYPE

def epicLinkField = getFieldByName('Epic Link')

if(epicLinkField.value){
def allIssueTypes = ComponentAccessor.constantsManager.allIssueTypeObjects
def issueTypeField = getFieldById(ISSUE_TYPE)
def availableIssueTypes = []

   availableIssueTypes.addAll(allIssueTypes.findAll { it.name != 'Epic' })
   issueTypeField.setFieldOptions(availableIssueTypes)
}
Prashant Mali May 13, 2021

Hi @Peter-Dave Sheehan ,

Thanks for reply. but we want to hide Epic issue type for specific screen  i.e 'Create issue in Epic' screen. Logic should be different than Normal create screen.

 

2021-05-13_14-21-51.png

Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 13, 2021

Normal create screen don't generally include an "epic link" field. So this script should work.

0 votes
Ankur tripathi May 4, 2021

Hi Prashant,

Under epic, you can only get options to create issues of task-level like stories, tasks, etc.

If you share the ss it would be easier to understand the error.

Suggest an answer

Log in or Sign up to answer