View Issue Details

This bug affects 1 person(s).
 12
IDProjectCategoryView StatusLast Update
19519Bug reportsSurvey participants (Tokens)public2024-09-23 17:29
ReporterMazi Assigned Togabrieljenik  
PrioritynoneSeverityblock 
Status closedResolutionfixed 
Product Version6.5.x 
Summary19519: When re-activating a token based survey the user is not asked to re-active the token table
Description

Previously, when re-activating a survey which had tokens assigned, you were asked if the token table should be re-activated as well. At the current 6.x version this check seems to be missing so you can accidentally run a closed survey as an open survey.
I recommend to bring back the old behavior people are used to to prevent such errors.

Steps To Reproduce

Steps to reproduce

Set up a survey with tokens.
Activate the survey.
Deactivate the survey.
Re-activate the survey.

Expected result

On re-activation one was previously asked if the old token table should be restored. This is missing, you now only deactivate and there is no hint about the token table.

Actual result

Ask the user to also re-activate the token table.

TagsNo tags attached.
Bug heat12
Complete LimeSurvey version number (& build)6.4.11
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMySQL
Server OS (if known)
Webserver software & version (if known)
PHP Version8.1

Users monitoring this issue

There are no users monitoring this issue.

Activities

Mazi

Mazi

2024-04-16 11:41

updater   ~79923

@DenisChenu, do you know if this is the new expected behavior or do you consider this to be a regression?

DenisChenu

DenisChenu

2024-04-16 14:44

developer   ~79934

No strong opinion on this one.

Mazi

Mazi

2024-04-16 16:30

updater   ~79935

It works differently at LS3 and LS5 so I consider this a regression.

DenisChenu

DenisChenu

2024-07-16 17:09

developer   ~80634

Maybe best solutuion :

  • No old token table : do like current 6.X
  • Old token table exist : redirect to token activation showing old token table
Mazi

Mazi

2024-07-17 19:35

updater   ~80652

@DenisChenu: Makes sense

gabrieljenik

gabrieljenik

2024-08-14 20:46

manager   ~80765

In previous versions, after activating the survey, it took you to a screen that said the survey had been activated, and asked if you wanted to keep it open or closed. If you clicked “closed,” it suggested you restore the old table.

Now it asks you the question BEFORE activating.

How should the behavior be?

On the other hand, it is difficult to test the operation properly because the restore of the token tables does not work. And it does not work because the archiving is wrong.
The problem is that when deactivating a survey, some tables are archived (token, responses and timings). For each table that is archived, an ArchivedTableSettings record must be saved, but it does it 3 times by overriding the record, instead of inserting new records.

Should we create a new ticket for this?

Mazi

Mazi

2024-08-15 08:59

updater   ~80766

@gabrieljenik, thanks a lot for thiss helpful summary. To my knowledge it was possible at the old versions to select from a list of previously deactivated token tables. Are you saying that due to the bug, only the latest one is now available? Then that surely is another issue.

gabrieljenik

gabrieljenik

2024-08-17 15:52

manager   ~80773

No, I am saying there are 2 issues.

Screenflow has changed

As the screenflow has changed, probably it the reativate screen got missed.

Bug

There is a bug when deactivating that will probably end up in only allowing the most recent version to be restored.

gabrieljenik

gabrieljenik

2024-08-28 15:49

manager   ~80846

https://github.com/LimeSurvey/LimeSurvey/pull/3943

Not to much inlove with the way DI is being used here, actually, we may get rid of it.
But as it was already being used, preferred to keep consistency

DenisChenu

DenisChenu

2024-08-28 15:57

developer   ~80849

Not to much inlove with the way DI is being used here, actually, we may get rid of it.
But as it was already being used, preferred to keep consistency

Same ! :+1:

guest

guest

2024-09-11 14:22

viewer   ~80958

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

tibor.pacalat

tibor.pacalat

2024-09-11 14:22

administrator   ~80959

Tested and merged.

gabrieljenik

gabrieljenik

2024-09-13 22:28

manager   ~81024

Reopening this as it is failing for 8.3.
I know (8.3 is not being tested here), but still, that made us think we needed a better solution as now probably something is off but unseen.

https://github.com/LimeSurvey/LimeSurvey/pull/3963

Also fixed a wrong "tbl_name" value.
(see attach)

LimeBot

LimeBot

2024-09-23 17:29

administrator   ~81102

Fixed in Release 6.6.4+240923

Related Changesets

LimeSurvey: master 17e2265e

2024-09-11 14:21:58

Gabriel Jenik


Committer: GitHub Details Diff
Fixed issue 19519: When re-activating a token based survey the user is not asked to re-active the token table (03943)

* Fixed issue 19519: When re-activating a token based survey the user is not asked to re-active the token table

- Fix creation of archived table settings records

* Fixed issue 19519: When re-activating a token based survey the user is not asked to re-active the token table

- Fix token table restore when there are no attributes

* Fixed issue 19519: When re-activating a token based survey the user is not asked to re-active the token table

- Fix creation of token archive table settings when there are custom attributes

---------

Co-authored-by: lapiudevgit <devgit@lapiu.biz>
Affected Issues
19519
mod - application/controllers/admin/Tokens.php Diff File
mod - application/libraries/DI.php Diff File
mod - application/models/services/SurveyDeactivate.php Diff File

Issue History

Date Modified Username Field Change
2024-04-16 11:41 Mazi New Issue
2024-04-16 11:41 Mazi Note Added: 79923
2024-04-16 11:41 Mazi Bug heat 0 => 2
2024-04-16 14:44 DenisChenu Note Added: 79934
2024-04-16 14:44 DenisChenu Bug heat 2 => 4
2024-04-16 16:30 Mazi Note Added: 79935
2024-07-16 16:43 tibor.pacalat Assigned To => gabrieljenik
2024-07-16 16:43 tibor.pacalat Status new => assigned
2024-07-16 17:09 DenisChenu Note Added: 80634
2024-07-17 19:35 Mazi Note Added: 80652
2024-08-14 20:46 gabrieljenik Note Added: 80765
2024-08-14 20:46 gabrieljenik Bug heat 4 => 6
2024-08-15 08:59 Mazi Note Added: 80766
2024-08-17 15:52 gabrieljenik Note Added: 80773
2024-08-28 15:49 gabrieljenik Assigned To gabrieljenik => DenisChenu
2024-08-28 15:49 gabrieljenik Status assigned => ready for code review
2024-08-28 15:49 gabrieljenik Note Added: 80846
2024-08-28 15:56 DenisChenu Assigned To DenisChenu => tibor.pacalat
2024-08-28 15:56 DenisChenu Status ready for code review => ready for testing
2024-08-28 15:57 DenisChenu Note Added: 80849
2024-09-11 14:22 Changeset attached => LimeSurvey master 17e2265e
2024-09-11 14:22 guest Note Added: 80958
2024-09-11 14:22 guest Bug heat 6 => 8
2024-09-11 14:22 tibor.pacalat Status ready for testing => resolved
2024-09-11 14:22 tibor.pacalat Resolution open => fixed
2024-09-11 14:22 tibor.pacalat Note Added: 80959
2024-09-11 14:22 tibor.pacalat Bug heat 8 => 10
2024-09-13 22:28 gabrieljenik Assigned To tibor.pacalat => gabrieljenik
2024-09-13 22:28 gabrieljenik Status resolved => assigned
2024-09-13 22:28 gabrieljenik Note Added: 81024
2024-09-23 17:29 LimeBot Note Added: 81102
2024-09-23 17:29 LimeBot Status assigned => closed
2024-09-23 17:29 LimeBot Bug heat 10 => 12