How to List Filter Subscription of an Issue Filter in JIRA
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.
- 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
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
filtersubscriptionentry 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