Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

JQL Filter for when custom field is updated within a timeframe

Cristina Carrillo
Contributor
March 8, 2023

Without having to download 3rd party apps. I would like to use a filter for when a custom field is updated but only when it is updated within 24hrs of ticket being assigned.

We have strict workflows and one specific field tracks if the customer issue has been resolved within 24hrs. Is this possible?

2 answers

2 accepted

2 votes
Answer accepted
Kristopher Perez
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 8, 2023

The CHANGED operator along with many of the HISTORY based operators are limited to only Assignee, Fix Version, Priority, Reporter, Resolution, and Status fields in Jira Cloud.


https://support.atlassian.com/jira-work-management/docs/advanced-search-reference-jql-operators/

The closest you could probably get is an automation that set's the Resolution or a Status to the required value when the other field you are monitoring has a satisfactory value.  Then make sure that either the Resolution or Status cannot be set in any other way besides filling out that specific field.

Kris

1 vote
Answer accepted
Hitesh
Contributor
March 8, 2023

To filter Jira issues based on when a custom field is updated within a timeframe, you can use JQL (Jira Query Language) with the following syntax:

<custom_field_name> CHANGED DURING ("<start_date>", "<end_date>")


Replace <custom_field_name> with the name of the custom field you want to filter on, and <start_date> and <end_date> with the range of dates you are interested in. For example:


priority CHANGED DURING ("2022-01-01", "2022-12-31")


This JQL query will return all issues where the "priority" field was changed between January 1st, 2022 and December 31st, 2022.

Note that the date format must be in the format "YYYY-MM-DD" and that the date range is inclusive, meaning that issues where the custom field was changed on the start or end date will be included in the results.

Cristina Carrillo
Contributor
March 10, 2023

Thank you @Hitesh !

If I want to measure it by 24hrs since these issues will be coming in on a daily basis would I then use 

 

<custom_field_name> CHANGED DURING "-24hrs"

Hitesh
Contributor
March 10, 2023

Yes, that would be the correct way to measure the custom field changes within the last 24 hours. Using the Jira JQL query "<custom_field_name> CHANGED DURING "-24hrs"" would return all the issues where the value of the custom field was changed during the last 24 hours.

Cristina Carrillo
Contributor
March 10, 2023

Thank you!

Like • Hitesh likes this
Fiona Brown
Contributor
August 29, 2023

@Hitesh This doesn't seem to work for custom fields. Have you managed to get this to work for a custom field ? It seems like it only works as per the docs say for these specific Jira system fields -> Note: This operator can be used with the Assignee, Fix Version, Priority, Reporter, Resolution, and Status fields only. (https://support.atlassian.com/jira-work-management/docs/jql-operators/)

Like • 3 people like this
Pierre Morel
Contributor
November 15, 2023

Same, I have a custom field and I get the same error message:

History searches do not support the 'XXX' field.

The custom field is a checkbox, I don't know if it makes any difference, have tried with "short text" and same, it does not work.

Like • 3 people like this
Venkata r Kuppa January 19, 2024

Great solution. @Hitesh Thanks.

Monica Brazelton
Contributor
May 21, 2024

I also see the "History searches do not support the <custom field name> field" error. It looks like custom fields cannot use the CHANGED operator. See the link @Kristopher Perez shared below.

@Hitesh @Venkata r Kuppa Have you actually gotten the CHANGED function to work for custom fields??

Like • Monica.Day likes this

Suggest an answer

Log in or Sign up to answer