Jira Expressions Issue Field 'epic'

Hi,

I just tried to use a Jira Expressions JQL search and having issues to use the issue.epic field.
My Use case is the following:

  • Epic: PROJ-1
  • The Epic contains a list of Stories with subtasks
  • I want to build a structure where I know which issue is a child of another issue

Jira Expressions:

  • JQL: “parentEpic in (PROJ-1)”
  • Expression: “{ issues: issues.map(issue => {id:issue.id,key:issue.key,isEpic: isEpic,parent: issue.parent,epic:issue.epic}) }”

I run into 2 issues and maybe someone have a solution:

  • isEpic is handled as expensive operation, which makes is not usable within a jql search
  • the usage of issue.epic will throw the following error: “Unknown error when transforming to bean. Try again and if the problem persists, contact Jira support”

My current workaround looks like this

  • isEpic: as I already know if “PROJ-1” is an epic based on a request before, I can use somethink like this (10005 is the issue ID of PROJ-1)
    isEpic: [10005].includes(issue.id)
  • epic: in a request before, I already get all Jira fields (rest/api/2/field) and searched for the field with the scheme “com.pyxis.greenhopper.jira:gh-epic-link”, which is customfield_10014 in my example and use this dynamic generated expression part
    parent: issue.${epicLinkField.id} || (issue.parent? issue.parent.key: null)

Hi,

Could you create two separate issues in the ACJIRA project for the problems you described? One feature request for making isEpic compute in constant time for issue collections, and another – a bug for the error thrown when issue.epic is returned from the REST API?

Hi,

Thank you for the response.
I was no longer able to reproduce the issue with “epic” and created a feature request for “isEpic” (ACJIRA-2170).

1 Like