How to Fix Old Jira Filter Subscription Emails with No Data Content
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Stale subscriptions keep sending emails with the subject as below:
[JIRA] Subscription: ${searchRequest.getName()
Diagnosis
From the database, check the below queries:
Get the list of subscription using the query:
select * from filtersubscription
Output retrieved similar to below :
id | filter_i_d | username | groupname | last_run | email_on_empty |
10002 | 11939 | admin |
| 2021-01-19T18:00:24.254Z | true |
10000 | 11911 | admin | Dev | 2021-01-20T09:30:26.515Z | true |
Once you retrieve the list, execute the below query to retrieve the relevant filter, with the filter_i_d retrieved from previous step:
select * from searchrequest where ID in ('11911','11939')
Output retrieved similar to below:
id | filtername | authorname | username | reqcontent | fav_count | filtername_lower | created | updated |
11911 | Open Deployment Tasks | admin | admin |
| 0 | open deployment tasks | 2020-05-04T06:52:54.910874Z | 2020-09-01T06:23:28.162941Z |
11939 | Resolved by Me - Today | admin | admin |
| 1 | resolved by me - today | 2020-09-03T07:42:31.278089Z | 2020-10-26T12:08:51.774253Z |
Check if the filters are part of the shared filters from the site, if not, then it is a deleted filter but the filter subscription exists for the same.
Cause
When the filter is deleted without deleting subscription, it sometimes tends to retain the value of the subscription.
Solution
Take monarch backup of the database.
Delete the subscriptions using any of the queries below:
delete from filtersubscription where "ID" in (10000, 10002)
or
delete from filtersubscription where filter_i_d = (select id from searchrequest where filtername in ('Open Deployment Tasks', 'Resolved by Me - Today');
Was this helpful?