JIRA Rest API: specific fields for change log

Daniel Pel March 16, 2022

Hi guys, I would like to ask if its possible to pull specific path for changelog.

For example, I only want to received the changes from the labels field.

 

Thank you

1 answer

0 votes
Neil
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 17, 2022

Hi Daniel, for clarity, can you please send an example of the REST API call you're making? I don't want to go down the wrong rabbit hole. :-) 

Daniel Pel March 18, 2022

Hi Neil, something like this:
https://jiratestenvironment.atlassian.net/rest/api/3/issue/BUG-98721/changelog?

since if we call this, we will have multiple values right? and I only want the changes done on the label field.

Thank you

Neil
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 18, 2022

Got it. So, the GET changelog (docs) method does not have an option to filter by event/change type. Therefore, you'll need to filter that out yourself after receiving the payload.

If you're building an app/script that needs to be aware of specific issue changes like label updates, you can use Jira Automation (link). You'd create an issue trigger for when a field value has changed (labels in your case), and then you can add an action to send a web request to a backend service on your side.

There's also the option of using standard webhooks (dev docs / product UI instructions); however, you can't get as granular as looking for changes to labels.. only that an issue was updated. 

Daniel Pel March 24, 2022

Hi @Neil , is there a way to know the time spent of an issue in a label? Currently, I can pull the time spent in Status but I also need the time spent on a label, is it possible? Thank you

Suggest an answer

Log in or Sign up to answer