View Issue Details

This issue affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
20723Bug reportsDatabase designpublic2026-10-09 15:19
ReporterDenisChenu Assigned Toc_schmitz  
PrioritynoneSeverityminor 
Status resolvedResolutionfixed 
Product Version7.3.x 
Summary20723: When delete a survey : old responses and token table arenot deleted
Description

When deleting a survey: old responses table are not deleted.

Steps To Reproduce

Steps to reproduce

Create a survey
Activate
Deactivate
Activate
Delete

Expected result

Old response table are deleted

Actual result

The response table was deleted, but the old response table is still there

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)7.3.0
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant

Relationships

related to 20722 confirmedc_schmitz When check data integrity : if you have a old response table : it broke 

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2026-09-24 16:24

developer   ~85970

I'm happy to fix it when 20722 is fixed.

c_schmitz

c_schmitz

2026-09-24 17:58

administrator   ~85977

Old response tables were never deleted in this scenario - but I think this might be a good idea.

DenisChenu

DenisChenu

2026-09-24 18:02

developer   ~85978

Last edited: 2026-09-24 18:03

Old response tables were never deleted in this scenario

What do you mean ?

I think old_reponse table (and all other old tables) must be deleted when a survey is deleted.
Currently : only deleted when check data integrity , then by superadmin.

PS : i think we need a "delete old table" by survey manager (if they have respo,nse/demlete and token delet permisison)

c_schmitz

c_schmitz

2026-10-09 15:19

administrator   ~86275

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=40719

Related Changesets

LimeSurvey: master aecf33e1

2026-10-09 15:19

c_schmitz


Details Diff
Fixed issue 20723: Deleting a survey left its archived response, timings and participant tables behind
Dev Survey::delete() now drops all old_*_<sid>_* tables and their archived_table_settings; delete confirmation warns about archived data
Affected Issues
20723
mod - application/models/Survey.php Diff File
mod - application/views/surveyAdministration/deleteSurvey_view.php Diff File
add - tests/unit/models/SurveyDeleteArchivedTablesTest.php Diff File

Issue History

Date Modified Username Field Change
2026-09-24 16:23 DenisChenu New Issue
2026-09-24 16:24 DenisChenu Relationship added related to 20722
2026-09-24 16:24 DenisChenu Note Added: 85970
2026-09-24 16:24 DenisChenu Bug heat 0 => 2
2026-09-24 17:58 c_schmitz Note Added: 85977
2026-09-24 17:58 c_schmitz Bug heat 2 => 4
2026-09-24 18:02 DenisChenu Note Added: 85978
2026-09-24 18:03 DenisChenu Note Edited: 85978
2026-10-09 15:19 c_schmitz Changeset attached => LimeSurvey master aecf33e1
2026-10-09 15:19 c_schmitz Note Added: 86275
2026-10-09 15:19 c_schmitz Assigned To => c_schmitz
2026-10-09 15:19 c_schmitz Status new => resolved
2026-10-09 15:19 c_schmitz Resolution open => fixed