Hello. I am trying to solve a problem for one of my teams (documentation team) that gets tasks assigned to their board through the clone of a specific subtask on the dev team board ear-marked for their needs. If it matters, they work from two different projects as the docs team supports the entire organization and have their own set of prioritized issues outside the scope of the devs.
My solution up to this point is as follows:
1.) When an issue is created on the dev project, I have post-script functions that auto create a set of subtasks (i.e. fix it, test it, document it). These functions are on the "Open" step -> "Create" transition of my workflow.
2.) When the "Document It" subtask is moved to Done, I have another post-script function that clones the issue if it is of custom sub-task issue type (Documentation Subtask). There are a number of custom fields I show on the "Document It" subtask that I need completed and passed along to the docs team, and must be filled in by the Dev Team in order to meet their definition of done.
3.) The Clone step executes, and copies over relevant information, but the problem is the summary of the cloned item just says "Document It". Therefore, every time a team completes this subtask, it clones over, but when you look at the Doc team board, all issues read "Document It", which is not very helpful for them.
What I would like to do is copy over the original summary of the parent issue of the "Document It" subtask, as that is the relevant information for the team that will help them determine what they are working on (right now they have to traverse the links to get to it, which is annoying). I don't want to append the parent summary to the "Document It" subtask, as that clutters the dev subtasks on the work view.
I have searched through the boards and come across a number of solutions that are close, but haven't been able to quite get one that solves this specific issues.
https://answers.atlassian.com/questions/167010/how-to-set-the-summary-of-an-issue-with-groovy-script-at-create-transition<br< a="">>
https://answers.atlassian.com/questions/147492/how-to-copy-parent-ticket-summary-to-sub-task-summary-by-script
I have tried adding to "Additional Issue Actions":
issue.summary = issue.parent.summary
- not sure if the parent issue is available at this step in the execution
issue.setSummary(issueLinkManager.getInwardLinks(issue.getId())*.getSourceObject().summary)
- guessing the link hasn't been created yet for this function to work as I can get this to test out successfully in the condition tester, but of course the clone already exists.
issue.summary = transientVars["originalissueobject"].summary
- returns subtask issue summary, rather than parent
Has anyone tried doing something similar? I have script runner and jira suite utilities plugins installed/enabled.
Thank you in advance.
Chris