I want to have a scripted field in my development tickets which can show me the current status of the linked Epic. This can help me create an overview for my releases.
We have Scriptrunner , JCMF and Automation for Jira.
I have looked at a lot of scripts through this forum, but none which does the trick for me.
Help would be greatly appreciated!
Assuming you want the workflow status of the epic (and not the internal epic status (new/in progress/done) ... you can do the following using a scriptrunner custom scripted field:
Give your new field a name: Status Of Epic
Set template = Custom
Put the following in the template:
#set ($componentAccessor = $constantsManager.getClass().forName('com.atlassian.jira.component.ComponentAccessor').newInstance())
#set ($cfManager = $componentAccessor.customFieldManager)
#set ($epicLinkField = $cfManager.getCustomFieldObjectByName('Epic Link'))
#set ($epic = $issue.getCustomFieldValue($epicLinkField))
#set ($status = $epic.status)
Then in the Inline Script:
def cfManager = ComponentAccessor.customFieldManager
def epicLinkField = cfManager.getCustomFieldObjectByName('Epic Link')
def epic = issue.getCustomFieldValue(epicLinkField)
If you don't care about displaying the status like it does for the current issue (with lozenge and color) then your can just set template=text
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events