How to check issue is archived or not using rest api, is there field for track archieve issue
Hello @Ramesh Krishnan
There is no direct way to do that, apart from parsing the event log, as @Nikola Perisic has correctly advised.
A workaround is use the Export Archived Issues endpoint to fetch all the archived issues, then compare that list against your usual Work Item queries to infer which ones are archived. It's a very long-winded workaround, but it does work.
Hello @Ramesh Krishnan
There isn't a direct way to retrieve this, rather you need to look for the change logs API:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is the most correct answer.
In more detail, the specific entry to look for in the event log are these items:
{
"field": "softArchived",
"fieldtype": "jira",
"fieldId": "softArchived",
"from": "false", <-- Will be false when archived, then true when restored
"fromString": null,
"to": "true", <-- Will be true when archived, then false when restored
"toString": null
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Ramesh Krishnan
Thanks for the question.
I found the following article where it describes how you can do that.
https://community.developer.atlassian.com/t/programmatically-test-if-an-issue-is-archived/35276
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I know you're keen to answer as many questions as possible on as many topics as possible every day, but wish you would actually test or validate half the advice you give people @Gor Greyan . That link you provided is to a five year old article about Jira SERVER.
The is no archiveddate or isArchived or archived ... or any similar object that is directly returned from any of the Jira Cloud REST APIs for any Work Item. This is well known and documented in JAC feature requests such as JRACLOUD-93868 and others.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Sunny Ape
Thank you for your feedback))
First, I didn't notice that the post was made in 2020.
Second, I didn't state that this 1is 00% working, I said that I found that.
Third, you can be sure that I am testing it when providing a solution; otherwise, I don't state that it is working.
Have a good day.
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.