I have a project built around publishing. Each Epic will require the same steps (cover, blurb, tag-line, etc.), so I am already automatically generating an Issue with these subtasks. For example:
Book 1 (Epic)
Format this book (issue)
pdf version (subtask)
mobi version (subtask)
epub version (subtask)
The problem is that once multiple books are in the project, that's going to be a lot of issues/subtasks with identical names. In order to fix this, I'm writing a script to add the title (in this case, "book 1"), to the summaries of the corresponding issue / subtasks. So, the end result should look like this:
Book 1 (Epic)
Format this book: Book 1 (issue)
pdf version: Book 1 (subtask)
mobi version: Book 1 (subtask)
epub version: Book 1 (subtask)
I'm close, but the "setSummary()" command at the end of this script isn't running, despite my successfully logging the necessary id's and summaries to make sure they're there.
I'm current running this code as a Post-Function: Any thoughts?
Have you try to use updateIssue function from IssueManager ?
updateIssue(ApplicationUser user, MutableIssue issue, EventDispatchOption eventDispatchOption, boolean sendMail)
It should be something like this
updateIssue(ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser(), TempIssue, EventDispatchOption.ISSUE_UPDATED, false)
Do not forget to import
I would have try to use automation for JIRA instead to achieve that with one automation/Task that create the Task and SubTask trigger when an Epic is created.
Regards
Oh, interesting!
It applied those changes to the database, but I had to re-index the server for those changes to show up.
Just need a way to re-index from the console, and I should be off to the races :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hopefully this link will help
https://community.atlassian.com/t5/Jira-questions/Scriptrunner-reindex-an-issue/qaq-p/803412
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.