Hi !
I have created a few EPICS broadly based on the number of projects, I have ( say 3 ).
Under each EPIC, i have created individual user story ( based on engineers in my team responsible for working on the project ).
Then there are individual jira issues which can be filed either externally or internally. Based on which engineer is working on them and broadly which project they fall under, I'd like to link an individual jira issue or a list of jira issues to their respective parent story.
Likewise, there could be a use case, where a standalone user story, might need to be linked to a Jira Epic.
I know how to do this via the GUI.
Is there a way to do this through python/jira APIs ? If yes, can you pls. share some snippets of code or point me to the relevant documentation for the same ?
I'm trying to search online, but not really making decent progress with this.
Appreciate your help.
Thanks and regards,
Akshay
Hi @Akshay Kothare , welcome on the community.
Epic link is custom field so you can update it on the Story with value you need. I have few lines of groovy, it might help.
def rootRequestEpic = ComponentAccessor.issueManager.getIssueByCurrentKey("key of the epic")
def story = ComponentAccessor.issueManager.getIssueByCurrentKey("key of the story")
def ID_OF_THE_EPIC_LINK_CF = XXX //you need to put ID of the Epic Link custom field here
def epicLinkCF = ComponentAccessor.customFieldManager.getCustomFieldObject(ID_OF_THE_EPIC_LINK_CF)
story.setCustomFieldValue(epicLinkCF, rootRequestEpic)
Let me know, if you need more help :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.