How to List Filter Subscription of an Issue Filter in JIRA
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
The purpose of this article is to show how to get a list of filter subscription of an issue filter in JIRA. The filter subscription can be seen at the "Details" of the issue filter. This article will help on getting a list of filter subscription of an issue filter in JIRA by executing a SQL command against the JIRA database.
Workaround
- Log in to JIRA database.
- Run the following SQL command to list the subscription:
select * from filtersubscription where filter_i_d = (select id from searchrequest where filtername = '<filter name>');
Substitute "<filter name>" in the query with your issue filter name
Example result will look like the following:
id | filter_i_d | username | groupname | last_run | email_on_empty
-------+------------+----------+---------------------+----------+----------------
10001 | 10001 | admin | jira-administrators | | false
(1 row)
For MSSQL, the SQL query will be:
SELECT * FROM [<your JIRA database name>].[dbo].[filtersubscription] WHERE [FILTER_I_D]=(SELECT ID FROM [<your JIRA database name>].[dbo].[searchrequest] WHERE [filtername]='<filter name>')
Substitute "<your JIRA database name>" and "<filter name>" in the query with your JIRA database name and your issue filter name
Additional information
The subscription details such as 'schedule' or 'next run' are stored in the clusteredjob
database table. To retrieve these data, run the following steps.
- Note the
id
of thefiltersubscription
entry from the query above. Append it to the following query
select * from clusteredjob where job_id = 'com.atlassian.jira.issue.subscription.DefaultSubscriptionManager:<subscription_id>';
Substitute "<subscription_id>" in the query with the filtersubscription id from step 1
Example result will look like following:
id | 11323 job_id | com.atlassian.jira.issue.subscription.DefaultSubscriptionManager:10002 job_runner_key | com.atlassian.jira.issue.subscription.DefaultSubscriptionManager sched_type | C interval_millis | first_run | cron_expression | 0 0 1 ? * 2,3,4 time_zone | next_run | 1553446800000 version | 1 parameters | BINARY, 333 Bytes
Column | Value | Human Readable Format |
---|---|---|
cron_expression | 0 0 1 ? * 2,3,4 | At 01:00:00am, on every Monday, Tuesday and Wednesday, every month via freeformatter |
next_run | 1553446800000 | Monday, March 25, 2019 1:00:00 AM GMT+08:00 via epochconverter |