Hi all
As part of our staff onboarding process - we create a few issues via the REST API and are also required to transition them through the workflow - there are 4 steps to get it to ‘closed’.
I have referred to the https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-issueidorkey-transitions-post documentation when initially deving this.
An issue we picked up is that, the script intermittently results in a 400 stating “Can’t move (KEY-3742). You might not have permission, or the issue is missing required information. If you keep having this problem, contact your Jira Administrator.” - The problem is the documentation says there are 5 possibilities for the 400 error. Returned if:
- no transition is specified.
- the user does not have permission to transition the issue.
- a field that isn’t included on the transition screen is defined in
fields
orupdate
. - a field is specified in both
fields
andupdate
. - the request is invalid for any other reason.
The below is what we do per issue that is auto created via API as well:
- Create issue
- Wait 5s for the create to complete
- Transition 1
- Wait 5s for the transition to complete
- Transition 2
- Wait 5s for the transition to complete
- Transition 3
- Wait 5s for the transition to complete
- Transition 4
- Wait 5s for the transition to complete
- Loop back to 1 above for the next issue
On trying this same script, it works smoother - but still intermittently fails some transitions.
Please advise?
Thank you
Yatish