We have a 1:m relationship between a custom app’s issue to the number of jira issues linked to it. The Jira issues have a custom field showing the app’s status and this field is automatically updated whenever our app’s issue status is changed. To do this, we grab a linked issue cache from our app’s db and run a put command for each issue whenever the app issue status changes.
If an issue is deleted or archived in Jira, this information is not updated in our app. All of the information flows from our app to Jira and not the other way. So when we run a put command, if an issue is deleted or archived a 400 error is thrown and our app cannot process the issue.
Problem we are trying to solve:
We would like to identify if the BadRequestException is due to the issue being archived and if so we will update our cache of linked issues in our app’s db so that the Jira issue link is removed from our app’s issue and our app system will no longer attempt to update that specific issue with future updates.
Is there an isArchived field in the issue or in the archive parameter of the Jira REST API call? A 400 error can be thrown for multiple reasons, e.g., edit permission issues on one of the custom fields, etc, so we don’t want to assume this is only reason for a failed update and unlink the issue.
If anyone has had a similar problem and/or knows the solution, your help would be greatly appreciated. Thanks.