View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
17942Bug reportsQuestion editorpublic2022-03-14 11:35
ReportersdsAdm1n Assigned Toc_schmitz  
PrioritynoneSeverityblock 
Status closedResolutionfixed 
Product Version5.2.x 
Summary17942: Question could not be deleted. There are conditions for other questions that rely on this question.
Description

Under certain case, question deletion is not applied , it happens when another question linked by condition to the targeted question get deleted which seems to leave a dependency in the database.

Please check the steps to reproduce for more details.

Steps To Reproduce

Steps to reproduce

  1. Create Q1 (the targeted question).
  2. Create Q2.
  3. Add a condition to Q2 based on Q1 answer.
  4. Delete Q2 (it will be deleted normally).
  5. Click to delete Q1

Expected result

Having Q1 deleted.

Actual result

Error message saying that "Question could not be deleted. There are conditions for other questions that rely on this question. You cannot delete this question until those conditions are removed" appears, and Q1 is not deleted.

TagsNo tags attached.
Attached Files
ErrorOnQdelete.png (5,744 bytes)   
ErrorOnQdelete.png (5,744 bytes)   
Bug heat4
Complete LimeSurvey version number (& build)Version 5.3.2+220302
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionMS SQL Server 2016
Server OS (if known)Win Server 2019
Webserver software & version (if known)IIS 10
PHP Version7.4

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2022-03-11 10:14

administrator   ~68626

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

c_schmitz

c_schmitz

2022-03-11 10:17

administrator   ~68627

On question deletion, any pending conditions were not deleted.
After this fix is released, please run integrity check to fix these.

LimeBot

LimeBot

2022-03-14 11:35

administrator   ~68655

Fixed in Release 5.3.5+220314

Related Changesets

LimeSurvey: master 62c1585a

2022-03-11 10:52

c_schmitz


Details Diff
Fixed issue 17942: Question cannot be deleted if another deleted question had a condition pending on it
Dev Added integrity check to fix such a scenario
Affected Issues
17942
mod - application/controllers/QuestionAdministrationController.php Diff File
mod - application/controllers/admin/CheckIntegrity.php Diff File
mod - application/models/Question.php Diff File

Issue History

Date Modified Username Field Change
2022-03-09 05:02 sdsAdm1n New Issue
2022-03-09 05:02 sdsAdm1n File Added: ErrorOnQdelete.png
2022-03-09 11:30 ollehar Zoho Project Synchronization => |Yes|
2022-03-11 09:52 c_schmitz Assigned To => c_schmitz
2022-03-11 09:52 c_schmitz Status new => assigned
2022-03-11 10:14 c_schmitz Changeset attached => LimeSurvey master 62c1585a
2022-03-11 10:14 c_schmitz Note Added: 68626
2022-03-11 10:14 c_schmitz Bug heat 0 => 2
2022-03-11 10:14 c_schmitz Resolution open => fixed
2022-03-11 10:17 c_schmitz Note Added: 68627
2022-03-11 10:17 c_schmitz Status assigned => resolved
2022-03-14 11:35 LimeBot Zoho Project Synchronization Yes => |Yes|
2022-03-14 11:35 LimeBot Note Added: 68655
2022-03-14 11:35 LimeBot Status resolved => closed
2022-03-14 11:35 LimeBot Bug heat 2 => 4