Can't delete board from database

debraj.neogi@tesco.com July 8, 2020

We are trying to delete boards associated with archived projects from the database.

We are running the below queries as per https://confluence.atlassian.com/jirakb/cannot-delete-rapid-board-295308141.html

SELECT ID FROM ao_60db71_rapidview WHERE NAME = '<your rapid board name>';

DELETE FROM ao_60db71_column WHERE RAPID_VIEW_ID = <your rapid view ID from step 1>;

DELETE FROM ao_60db71_rapidview WHERE NAME = '<your rapid board name>';

 

While executing 2nd query, getting below error:

Error report -
SQL Error: ORA-02292: integrity constraint (JIRA_APP.fk_ao_60db71_estima1932123493) violated - child record found
02292. 00000 - "integrity constraint (%s.%s) violated - child record found"
*Cause:    attempted to delete a parent key value that had a foreign
           dependency.
*Action:   delete dependencies first then parent or disable constraint.

 

Can someone please help? Thank you.

2 answers

0 votes
Jens Kisters //SeibertSolutions
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 5, 2023

this worked for me (Jira 8.20, mysql)

deleted multiple boards at a time

use case: Boards without filters were popping up in a DC2Cloud Dark Feature Migration and couldnt be deleted via the UI

DELETE
FROM AO_60DB71_BOARDADMINS
WHERE RAPID_VIEW_ID IN (a,
b,
c);

DELETE
FROM AO_60DB71_COLUMNSTATUS
WHERE COLUMN_ID IN
(SELECT ID
FROM AO_60DB71_COLUMN
WHERE RAPID_VIEW_ID IN (a,
b,
c));

DELETE
FROM AO_60DB71_COLUMN
WHERE RAPID_VIEW_ID IN (a,
b,
c);

DELETE
FROM AO_60DB71_CARDLAYOUT
WHERE RAPID_VIEW_ID IN (a,
b,
c);

DELETE
FROM AO_60DB71_CARDCOLOR
WHERE RAPID_VIEW_ID IN (a,
b,
c);

DELETE
FROM AO_60DB71_DETAILVIEWFIELD
WHERE RAPID_VIEW_ID IN (a,
b,
c);

DELETE
FROM AO_60DB71_ESTIMATESTATISTIC
WHERE RAPID_VIEW_ID IN (a,
b,
c);

DELETE
FROM AO_60DB71_QUICKFILTER
WHERE RAPID_VIEW_ID IN (a,
b,
c);

DELETE
FROM AO_60DB71_STATSFIELD
WHERE RAPID_VIEW_ID IN (a,
b,
c);

DELETE
FROM AO_60DB71_SUBQUERY
WHERE RAPID_VIEW_ID IN (a,
b,
c);

DELETE
FROM AO_60DB71_SWIMLANE
WHERE RAPID_VIEW_ID IN (a,
b,
c);

DELETE
FROM AO_60DB71_TRACKINGSTATISTIC
WHERE RAPID_VIEW_ID IN (a,
b,
c);

DELETE
FROM AO_60DB71_WORKINGDAYS
WHERE RAPID_VIEW_ID IN (a,
b,
c);

DELETE
FROM AO_60DB71_RAPIDVIEW
WHERE ID IN (a,
b,
c);

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 8, 2020

Do not try to do this in the database, you will almost certainly destroy your Jira installation.

The document you are using is only about deleting boards that have failed to be created.

Take a step back and look properly at what you are trying to achieve.  Why are you doing this?  Why have you jumped into doing it the wrong way?

debraj.neogi@tesco.com July 8, 2020

Thank you so much for replying Nic.

We have a housekeeping project where we are archiving projects (not updated in last 730 days) once every month. Once the projects are archived, the boards are still available to be found in the DB. So this was an effort from our end to keep a track of the projects getting archived, extract info from DB regarding boards associated with these projects and then remove those boards from the database. Hope this is clear.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 8, 2020

Perfectly, but why are you looking in the database?  It's the worst possible way to look at anything in Jira and certainly never the way to amend anything.

debraj.neogi@tesco.com July 8, 2020

Thanks for the advice Nic. Saved us a lot of time and trouble.

We tried exploring the below option as well (however could not proceed since we do not store log files beyond last 90 days)

*************************************************************************

Copy log files older than 2 years to Temp directory.

Run below command:
grep -ne "rapid" /appl/jira/atlassian-jira-software-7.13.11-standalone/logs/access_log.2020-0* | grep -o 'rapidView=[0-9]*' | cut -d'=' -f2 | sort | uniq

Copy output string in Excel, apply formula and concatenate.

SELECT * FROM ao_60db71_rapidview where ID not in (1, 2, 3);

Export into CSV (Board name, Filter name and other details)

DELETE ao_60db71_rapidview where ID not in (1, 2, 3);

 

*************************************************************************

 

What do you recommend as a possible way to get this done? Thanks in advance.

Goran Dermeta August 7, 2020

@Nic Brough -Adaptavist- , how do you suggest we tackle similar problem.

We did a JIRA split, exported 200+ projects to other instance, and then through JIRA UI option deleted projects we didn't need.

Now I am seeing a bunch of boards and filters left in DB. Those boards are not visible in UI, as they are based on projects which are deleted.

Logging as users who went over to another instance offer only a small number of shared filters and dashboards to delete, and I really don't want to log in for each individual who left.

Is there any better way to go forward with this?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events