The problem is:
2024-06-20 17:36:39,703 ERROR [runner.AbstractScriptListener]: ************************************************************************************* 2024-06-20 17:36:39,703 ERROR [runner.AbstractScriptListener]: Script function failed on event: com.atlassian.jira.event.issue.IssueEvent, file: null com.adaptavist.hapi.jira.issues.exceptions.IssueUpdateValidationException: The following errors occurred: (issuetype=Запрос имеет тип под-задачи, но родительский Запрос или идентификатор не определен.) at com.adaptavist.hapi.jira.issues.implementation.IssuesImplementation.update(IssuesImplementation.groovy:189) at com.adaptavist.hapi.jira.extensions.IssueExtensions.update(IssueExtensions.java:67) at Script66.run(Script66.groovy:32)
I just try to update a field value for subtask on assigned event. Script works when issue updated with new assignee but doesn't work when issue created with first assignee
Hi Ernest! Based on the rough translation of the error, it means that the parent ID is missing for the task, so you must specify them during issue creation.
An example in this ScriptRunner documentation might be helpful for you : https://docs.adaptavist.com/sr4js/latest/hapi/create-issues#:~:text=Creating%20a%20subtask,specify%20the%20subtask%20issue%20type.
If you're running this script from a listener, you will need to specify the parent issue first with like the example below :
def issue = event.getIssue()
issue.createSubTask('Sub-task') {
setAssignee('robot')
setSummary("test")
}
Hope this helps!
Welcome to the community, @Ernest 👋
Your question is related to Scriptunner, an Atlassian Marketplace app from Adaptavist, so I moved your question here to App Central, which is the best place for questions related to marketplace add-ons.
In my experience, you may get faster service from marketplace partners by contacting their support team directly.
If you choose that course, please come back and update this thread with the solution.
Good luck,
-dave
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.