Forums

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

Is there a way to track the changes made to a JIRA filter's query text?

harini_vallabhaneni
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 19, 2018

We want to maintain history of the changes made to some of our standard filters over time. I was wondering if JIRA can automatically provide that history based on the filter id? I mean changes to the query text and not the results.

1 answer

0 votes
Earl McCutcheon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 24, 2018

Hello Harini,

No there is not a method to achieve this in the UI, when a filter is updated is set with that value in the database under the searchrequest table, and the change history of these values is not preserved. An alternative approach is to look into a third party auditing plugin such as Auditor for Jira, which does note the plugin tracks Edits to Shared Filters in this document under their support docs for the add-on.

But if you wanted to review the data locally to look into creating some scripted log monitoring tool to the filter the data.  The Current value and ID is located in the DB as EXE:

SELECT * FROM searchrequest where id = 10308;
id | filtername | authorname | description | username | groupname | projectid | reqcontent | fav_count | filtername_lower
-------+-------------+------------+-------------+----------+-----------+-----------+----------------+-----------+------------------
10308 | TEST_filter | admin | | admin | | | project = asdf | 1 | test_filter
(1 row)

The change is output to the http access logging so you could monitor the http-access logs for update events applied to the filter ID,  registered as a series of POST and PUT action's on the filter ID these would register with output similar to:

<BASE_URL OR IP Address:PORT> 864x23964x1 admin [24/Jul/2018:14:24:48 -0500] "POST /rest/analytics/1.0/publish/bulk HTTP/1.1" 200 40 82 "http://<BASE_URL OR IP Address:PORT>/issues/?filter=10308&jql=project%20%3D%20asdf%20ORDER%20BY%20created%20" 
<BASE_URL OR IP Address:PORT> 864x23965x1 admin [24/Jul/2018:14:24:54 -0500] "PUT /rest/api/2/filter/10308?expand=subscriptions[-5:] HTTP/1.1" 200 447 29 "http://<BASE_URL OR IP Address:PORT>/issues/?filter=10308&jql=project%20%3D%20asdf%20ORDER%20BY%20created%20"
<BASE_URL OR IP Address:PORT> 864x23966x1 admin [24/Jul/2018:14:24:54 -0500] "PUT /rest/issueNav/1/issueTable/sessionSearch/ HTTP/1.1" 200 40 21 "http://<BASE_URL OR IP Address:PORT>/issues/?filter=10308&jql=project%20%3D%20asdf%20ORDER%20BY%20created%20"
<BASE_URL OR IP Address:PORT> 864x23967x1 admin [24/Jul/2018:14:24:58 -0500] "POST /rest/analytics/1.0/publish/bulk HTTP/1.1" 200 40 1 "http://<BASE_URL OR IP Address:PORT>/issues/?filter=10308&jql=project%20%3D%20asdf%20ORDER%20BY%20created%20"

Noting the Filter=10308 was changed to project = asdf order by created by user admin where previously it was only project = asdf

jql=project%20%3D%20asdf%20ORDER%20BY%20created%20"

Regards,
Earl

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events