Board not visible after filter deletion in Jira Data Center
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
This article assumes the board itself has not been deleted, and all permissions are correct.
A Jira Software board is inaccessible after its associated filter is deleted. Accessing the board URL will display one of the warning messages below:
The requested board cannot be viewed because it either does not exist or you do not have permission to view it
You can't view this board - It may have been deleted or you don't have permission to view it
Diagnosis
Environment
Jira Software 6.0.7 and above.
You can query the database for all boards that have invalid filters associated with them.
The below SQL allows admins to find all boards where the associated Filter ID is non-existent. Boards returned in this way won't cause problems unless they need to be accessible. The returned results may therefore be more than expected.
PostgreSQL
1
2
3
4
5
6
7
8
9
10
11
12
SELECT DISTINCT
rv."ID" AS "Board ID"
, rv."NAME" AS "Board Name"
, rv."OWNER_USER_NAME" AS "Board Owner"
, ba."RAPID_VIEW_ID" AS "Foreign Key ID from the Board Admins table"
FROM "AO_60DB71_RAPIDVIEW" rv
LEFT JOIN searchrequest sr ON (rv."SAVED_FILTER_ID" = sr.id)
LEFT JOIN "AO_60DB71_BOARDADMINS" ba ON (rv."ID" = ba."RAPID_VIEW_ID")
WHERE NOT EXISTS ( SELECT *
FROM searchrequest
WHERE id = rv."SAVED_FILTER_ID" )
ORDER BY rv."ID";
Oracle, MySQL, MSSQL
1
2
3
4
5
6
7
8
9
10
11
12
SELECT DISTINCT
rv.ID AS "Board ID"
, rv.NAME AS "Board Name"
, rv.OWNER_USER_NAME AS "Board Owner"
, ba.RAPID_VIEW_ID AS "Foreign Key ID from the Board Admins table"
FROM AO_60DB71_RAPIDVIEW rv
LEFT JOIN searchrequest sr ON (rv.SAVED_FILTER_ID = sr.id)
LEFT JOIN AO_60DB71_BOARDADMINS ba ON (rv.ID = ba.RAPID_VIEW_ID)
WHERE NOT EXISTS ( SELECT *
FROM searchrequest
WHERE id = rv.SAVED_FILTER_ID )
ORDER BY rv.ID;
Cause
If the shared filter associated with a board is deleted from Jira, the board will no longer be visible on the Manage Boards page.
This is because Jira Software is unable to determine the filter details of the board.
Solution
Create a dummy filter and associate the offending boards with it
Create a new filter using Jira's User Interface. Then run the SQL SELECT below to get that filter's ID. We'll link offending boards to the new filter.
Get the filter ID
From Issue Navigator, the filter ID will be in your browser's address bar, via the URL:
1
http://<your_jira_url>/issues/?filter=<filter_id>
Alternatively, you can retrieve the filter ID through the database:
PostgreSQL, Oracle, MySQL, MSSQL
1
SELECT id FROM searchrequest WHERE filtername = '<dummy filter name>';
Update the database
Once you have the filter ID, the UPDATE statement below will re-associate any offending boards to your new dummy filter.
POSTGRESQL
1
2
3
UPDATE "AO_60DB71_RAPIDVIEW" rv
SET "SAVED_FILTER_ID" = <filter ID from the SELECT above>
WHERE NOT EXISTS ( SELECT id FROM searchrequest WHERE id = rv."SAVED_FILTER_ID" );
Oracle, MySQL, MSSQL
1
2
3
UPDATE AO_60DB71_RAPIDVIEW
SET SAVED_FILTER_ID = <filter ID from the SELECT above>
WHERE NOT EXISTS ( SELECT id FROM searchrequest WHERE id = AO_60DB71_RAPIDVIEW.SAVED_FILTER_ID );
Refresh the Jira cache
Since manual intervention on the database doesn't automatically refresh the cache related to these configurations, you have two options:
Restart Jira to recreate all cache
Run the following command on a terminal
1
curl -X GET -u username:password "<JIRA_BASE_URL>/rest/greenhopper/1.0/configuration/cache/flushAll"
Or you can request this API endpoint from a browser where you have already authenticated:
1
2
3
4
<JIRA_BASE_URL>/rest/greenhopper/1.0/configuration/cache/flushAll
Expected output:
GreenHopper caches flushed%
Multiple board deletion
If there are a large number of boards that you want to delete, you can use the dummy filter ID alongside the below SQL:
Before the second step to update the database with the dummy filter ID, run the below query to note down the IDs for the boards which have lost their corresponding filter with a query as follows
PostgreSQL
1 2 3 4 5
SELECT DISTINCT rv."ID" AS "Board ID" FROM "AO_60DB71_RAPIDVIEW" rv LEFT JOIN searchrequest sr ON (rv."SAVED_FILTER_ID" = sr.id) WHERE NOT EXISTS (SELECT * FROM searchrequest WHERE id = rv."SAVED_FILTER_ID") ORDER BY rv."ID";
Copy the output of the above query to a file called
data.txt
Remove the column name "Board ID" from the file
Follow the rest of the steps above, starting from the
UPDATE
queryProceed to refresh the cache
Run the below curl command to delete all the rapid boards that have been associated with the new dummy filter
Be sure to substitute username, password, and JIRA_BASE_URL.
It should be run from the directory where the data.txt file was stored
It should return a 204 for every successful deletion
Delete Boards
1
xargs -I{} curl -v -u user:pass -X DELETE -H "Content-Type: application/json" JIRA_BASE_URL/rest/agile/1.0/board/{} < data.txt
A suggestion to prevent this from happening is being tracked at JSWSERVER-6706 and has been implemented in Jira 9.11.0 and later.
Was this helpful?