Jira Software boards not visible after filter deletion

Still need help?

The Atlassian Community is here for you.

Ask the community

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 JIRA Software rapid board is missing after its associated filter is deleted. Accessing the board URL will display the warning message below:

The requested board cannot be viewed because it either does not exist or you do not have permission to view it.

Or:

You can't view this board
It may have been deleted or you don't have permission to view it.

This article focuses on the case where the board still exists and the permissions are properly setup.

Environment

Jira Software 6.0.7 and above.

Diagnosis

The symptom may be this screen or a similar error message:

Next, you can validate the database for all boards that have invalid filters associated with them:

The below SQL allows admins to find all the board column statuses with non-existing status ids. These boards won't cause problems unless they need to be accessed so you may see a bigger list than expected.

PostgreSQL
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
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 not be visible anymore on the Manage Boards page.

This is caused by the fact that JIRA Software is unable to determine the filter details of the board and it does not show the board anymore.

Solution

Always perform a backup of the JIRA data as described in Backing Up Data before proceeding

Fix 1: Create a dummy filter and associate the offending boards to it

Create a filter in the UI. Then run the SQL SELECT below to get that filter ID - we'll use it to link the offending boards with it.

Once you have the filter ID, the UPDATE statement below will re-associate any offending boards to your new dummy filter.

1. Getting the ID:

  1. From Issue Navigator, it will be in the URL as given in the below example:

    http://yourserver/issues/?filter=36633

    The filter id is 36633 in this example.

  2. Or through the database:
PostgreSQL, Oracle, MySQL, MSSQL
SELECT id FROM searchrequest WHERE filtername = '<dummy filter name>';

2. Updating the database:

POSTGRESQL
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
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 );

3. Refreshing the cache:

Since manual intervention on the database doesn't not automatically refresh the cache related to these configuration, you have two options:

  • Option A:

Restart Jira. This will recreate all cache.

  • Option B:

run the following command on a terminal:

curl -X GET -u username:password "<JIRA_BASE_URL>/rest/greenhopper/1.0/configuration/cache/flushAll"


Or you can paste that on a browser where you have already authenticated:

<JIRA_BASE_URL>/rest/greenhopper/1.0/configuration/cache/flushAll

This is the expected output:

GreenHopper caches flushed%
Multiple board deletion

In case there are a large number of boards that you want to delete and prefer to go with fix 2, with the dummy filter provided above, please try the following:

  1. 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
    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";
  2. Copy the output of the above query to a file called data.txt. Remember to remove the column name "Board ID" from the file.
  3. Then follow the rest of the steps in the Fix 1 section above starting from step 2 to update the boards with a dummy filter. Proceed to refresh the cache

  4. Finally run the below curl command to delete all the rapid boards that have been associated with the new dummy filter, after substituting for username and 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
    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  GHS-6706 - Getting issue details... STATUS




Last modified on Jun 13, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.