Hello,
Do you know if can be possible to be created automatically an issue (for example a Story) when Epic issue-type goes through "Analyzed" status with a script/post function?
It is needed to be implemented this on Jira Server.
Thank you !
Best regards,
Alin
It is possible with ScriptRunner (I see you included the Script tag in your post so you may have that app?). If so, I can share a bit about how I accomplish this.
Hello,
Yes, we have installed Adaptavist ScriptRunner for JIRA, installed version: 6.15.0.
It would be great if you can provide me some steps.
Thank you !
Best regards,
Alin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So, there is a lot of extra code in my script, but here is the section where I actually create a new issue. Some imports are necessary. Check it out and let me know if you have any questions about it.
IssueService issueService = ComponentAccessor.getIssueService()
IssueInputParameters issueIP = issueService.newIssueInputParameters()
issueIP.setProjectId(projectId)
issueIP.setIssueTypeId((String)issueTypeWorkOrder)
issueIP.setSummary(summary)
issueIP.setDescription(description)
issueIP.setReporterId(parentIssue.getReporter().getUsername())
issueIP.setDueDate(dueDate)
issueIP.addCustomFieldValue(customFieldRequestType,(String)(requestTypeMap[parentRequestType]))
issueIP.addCustomFieldValue(customFieldDisableAccess,disableAccessDate)
issueIP.addCustomFieldValue(customFieldRequestedFor,parentRequestedFor)
issueIP.addCustomFieldValue(customFieldApprovers,approver,backupApprover)
issueIP.addCustomFieldValue(requestTypeDescFieldId,requestTypeDescValue)
IssueService.CreateValidationResult newIssue
newIssue = issueService.validateCreate(jiraAdminUser, issueIP);
IssueService.IssueResult iResult = issueService.create(jiraAdminUser, newIssue);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now it's working to create a Story automatically when the Epic goes to "Analyzed".
But the wrong part is that it always creates a Story when the transition is accessed(because it's a shared transition).
Basically I need to be created only one "Story" on this shared transition.
Thank you !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.