Dependency Graph

Dependency Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

This bug affects 1 person(s).
 12
IDProjectCategoryView StatusLast Update
18460Bug reportsImport/Exportpublic2022-11-30 15:42
ReporterMazi Assigned Togabrieljenik  
PrioritynoneSeveritypartial_block 
Status in code reviewResolutionopen 
Product Version3.28.x 
Summary18460: Assigned survey group is gone after survey export/import
Description

When exporting a survey which is assigned to survey group X and then importing that LSS file, the assignment to survey group X is gone.

Steps To Reproduce

Steps to reproduce

Assign a survey to a certain survey group.
Export survey as LSS file.
Import LSS file.
Check assigned survey group.

Expected result

Imported survey should still be assigned to the same survey group if exists.
(If not exists, show a warning similar to how it is done for missing theme)

Actual result

Survey group assignment is missing.

TagsNo tags attached.
Bug heat12
Complete LimeSurvey version number (& build)3.28.32
I will donate to the project if issue is resolvedNo
Browser
Database type & versionMariaDB 10.1.48
Server OS (if known)
Webserver software & version (if known)
PHP VersionPHP 7.4

Relationships

related to 18509 confirmed Permissions are gone after survey export/import 

Activities

DenisChenu

DenisChenu

2022-11-05 18:43

developer   ~72576

It must be an option … same issue with Permission.

It must be different if you import on same instance or different one (group are not the same)

Then : when copy : we can copy Permission + Group
When import : unsure …

ollehar

ollehar

2022-11-07 11:49

administrator   ~72596

It must be different if you import on same instance or different one (group are not the same)

Hm yes, you can't uniquely identify a survey group between installations. So does it make sense to "guess" a survey group?

DenisChenu

DenisChenu

2022-11-07 11:51

developer   ~72597

Last edited: 2022-11-07 11:51

Hm yes, you can't uniquely identify a survey group between installations. So does it make sense to "guess" a survey group?

By name by option when import ? Same for Permission ?

Mazi

Mazi

2022-11-07 12:10

updater   ~72600

@ollehar: I assume that at 90% of the cases you jst copy (or export/import) within the same system so checking for matchting IDs and similar names should be sufficient.
If needed add a setting to exclude group assignment on import/copy.

Mazi

Mazi

2022-11-07 12:11

updater   ~72601

Maybe also show a short note "Survey assigned to survey group XYZ." after copy.

DenisChenu

DenisChenu

2022-11-07 13:31

developer   ~72604

@ollehar: I assume that at 90% of the cases you jst copy (or export/import) within the same system so checking for matchting IDs and similar names should be sufficient.

When you copy : it must be the case (like Permission in 3.X cuirrently).
Export import is different.

gabrieljenik

gabrieljenik

2022-11-07 14:41

manager   ~72614

I guess the same happens in many other situations:

  • User Group Permissions
  • UserName Permissions
  • SurveyThemes

Matching by name is fine I guess.
If not found, we can rise a warning.

DenisChenu

DenisChenu

2022-11-07 15:38

developer   ~72621

User Group Permissions

This didn't exist …

UserName Permissions

Yes : already written "same issue with Permission"

SurveyThemes

Oh yes : theme have number in export … but seems they use name : with core and extended.
But less issue here i think

gabrieljenik

gabrieljenik

2022-11-07 15:44

manager   ~72623

I mean, there are other places where the linking by name is done for importing.
We should do this here as well.

DenisChenu

DenisChenu

2022-11-07 16:49

developer   ~72626

Yes :)

But only Permission and SurveyGroup are not seen quickly and can have some «security» issue :).

For theme : it shown when you test ;)

Mazi

Mazi

2022-11-16 12:48

updater   ~72759

@gabrieljenik or @DenisChenu, can you pick this up so we get it included into one of the following releases?

gabrieljenik

gabrieljenik

2022-11-23 20:42

manager   ~72879

Master PR for Survey Groups: https://github.com/LimeSurvey/LimeSurvey/pull/2745

gabrieljenik

gabrieljenik

2022-11-23 20:45

manager   ~72880

Created 18509 for handling permissions

DenisChenu

DenisChenu

2022-11-24 10:12

developer   ~72881

I like to have a checkbox (unchecked by default)
OK ?

Mazi

Mazi

2022-11-24 11:00

updater   ~72883

Why should such a new checkbox be unchecked by default? If the same survey group exists, it should get mapped.

E.g. user permissions are copied along as well on export/import, why should this behave differently?

I think a checkbox is not needed. I see no real use case at which assigning the survey to the same group will cause any issues. In any way, you can always adjust the assignment later if needed.

DenisChenu

DenisChenu

2022-11-24 12:07

developer   ~72884

Last edited: 2022-11-24 12:08

Why should such a new checkbox be unchecked by default? If the same survey group exists, it should get mapped.

If you use "restricted" name, and i use "restricted" name too on another instance.

If i put some secret survey inside with right to some people : i surely don't want to have this right auto assigned.
When export/import ; it's can be different instance with different way to manage. It must NOT be by default, else there are big potential confidential issue.

E.g. user permissions are copied along as well on export/import, why should this behave differently?

I don't think with import/export … see https://bugs.limesurvey.org/view.php?id=18509

I think a checkbox is not needed. I see no real use case at which assigning the survey to the same group will cause any issues. In any way, you can always adjust the assignment later if needed.

Survey group can give right to survey inside the group

  • Export/import on same instance : no real issue
  • Export/import on different instance : confidentiality issue
DenisChenu

DenisChenu

2022-11-25 10:10

developer   ~72889

@Mazi : https://github.com/LimeSurvey/LimeSurvey/pull/2745#issuecomment-1327189281

Mazi

Mazi

2022-11-25 10:22

updater   ~72891

@DenisChenu, I understand the issue you mentioned. But to me the mentioned scenario of having the exact same survey group name on different instances is a rather theoretical issue. Of course, it can lead to security issues if permissions are assigned as mentioned on Github, but we deal with >250 Limesurvey projects every year and I can not imagine having ever faced such a use case.

If it helps, we can add the checkbox, but the default behavior should be to always assign the survey to the survey group. Because that will be the use case for 99% of the users.

DenisChenu

DenisChenu

2022-11-25 10:25

developer   ~72892

But to me the mentioned scenario of having the exact same survey group name on different instances is a rather theoretical issue.

What ???? I already seen it a lot of time !

I can not imagine having ever faced such a use case.

Your experience are not all reality …

Because that will be the use case for 99% of the users.

We don't have this feature since start and you are the 1st to ask … import/export != copy
If you need same : why not copy survey ?

Mazi

Mazi

2022-11-25 10:31

updater   ~72893

Well, I am not against adding the checkbox. It makes sense when facing the scenario you mentioned. We should also add a warning as mentioned. But the default setting should fit the 90% of users which just want the survey to be assiged to the same survey group if exists.

"Why not copy?" -> Because customers often develop surveys at system A and then export the final version and import that at system B.

maknase

maknase

2022-11-25 12:50

reporter   ~72894

I can only speak of me, but me and my colleagues are facing this issue on a daily basis and keeping the survey group name on importing would save us a lot of time and avoid possible errors. As of now, we always need to edit the survey again after importing to set it to the desired survey group name, before we can continue. Having the optional checkbox to keep the survey group name on importing would be highly appreciated.

DenisChenu

DenisChenu

2022-11-25 14:57

developer   ~72896

Having the optional checkbox to keep the survey group name on importing would be highly appreciated.

Totally right.

  1. Having a checkbox is NEEDED

After the questoin is more by default or not.

c_schmitz

c_schmitz

2022-11-25 15:05

administrator   ~72899

Last edited: 2022-11-25 15:08

After internal discussion here is the decision on the solution:

  • Group is searched for by name by default (this is already done)
  • Permissions are checked if user may use this group, at all. (tbd)
  • If yes, survey is imported into that group, if not then the Default group is used.
  • On the import summary screen user gets a clear hint that the survey was imported into survey group 'X'.

No checkbox on import is needed. Since the user has permission to modify the assignment to the survey group he can still change it, afterwards.

gabrieljenik

gabrieljenik

2022-11-30 15:21

manager   ~72942

Updated PR!

DenisChenu

DenisChenu

2022-11-30 15:42

developer   ~72943

Need to check survey/import not just see surveygroup

Issue History

Date Modified Username Field Change
2022-11-05 13:03 Mazi New Issue
2022-11-05 18:43 DenisChenu Note Added: 72576
2022-11-05 18:43 DenisChenu Bug heat 0 => 2
2022-11-07 11:49 ollehar Note Added: 72596
2022-11-07 11:49 ollehar Bug heat 2 => 4
2022-11-07 11:51 DenisChenu Note Added: 72597
2022-11-07 11:51 DenisChenu Note Edited: 72597
2022-11-07 12:10 Mazi Note Added: 72600
2022-11-07 12:10 Mazi Bug heat 4 => 6
2022-11-07 12:11 Mazi Note Added: 72601
2022-11-07 13:31 DenisChenu Note Added: 72604
2022-11-07 14:41 gabrieljenik Note Added: 72614
2022-11-07 14:41 gabrieljenik Bug heat 6 => 8
2022-11-07 14:41 gabrieljenik Status new => confirmed
2022-11-07 15:38 DenisChenu Note Added: 72621
2022-11-07 15:44 gabrieljenik Note Added: 72623
2022-11-07 16:49 DenisChenu Note Added: 72626
2022-11-16 12:48 Mazi Note Added: 72759
2022-11-16 13:55 gabrieljenik Assigned To => gabrieljenik
2022-11-16 13:55 gabrieljenik Status confirmed => assigned
2022-11-23 20:42 gabrieljenik Assigned To gabrieljenik => DenisChenu
2022-11-23 20:42 gabrieljenik Status assigned => ready for code review
2022-11-23 20:42 gabrieljenik Note Added: 72879
2022-11-23 20:45 gabrieljenik Issue cloned: 18509
2022-11-23 20:45 gabrieljenik Relationship added related to 18509
2022-11-23 20:45 gabrieljenik Note Added: 72880
2022-11-24 10:12 DenisChenu Assigned To DenisChenu =>
2022-11-24 10:12 DenisChenu Assigned To => gabrieljenik
2022-11-24 10:12 DenisChenu Note Added: 72881
2022-11-24 11:00 Mazi Note Added: 72883
2022-11-24 12:07 DenisChenu Note Added: 72884
2022-11-24 12:08 DenisChenu Note Edited: 72884
2022-11-25 10:10 DenisChenu Note Added: 72889
2022-11-25 10:12 DenisChenu Status ready for code review => in code review
2022-11-25 10:22 Mazi Note Added: 72891
2022-11-25 10:25 DenisChenu Note Added: 72892
2022-11-25 10:31 Mazi Note Added: 72893
2022-11-25 12:50 maknase Note Added: 72894
2022-11-25 12:50 maknase Bug heat 8 => 10
2022-11-25 14:57 DenisChenu Note Added: 72896
2022-11-25 15:05 c_schmitz Note Added: 72899
2022-11-25 15:05 c_schmitz Bug heat 10 => 12
2022-11-25 15:06 c_schmitz Status in code review => assigned
2022-11-25 15:08 c_schmitz Note Edited: 72899
2022-11-25 15:08 c_schmitz Note Edited: 72899
2022-11-30 15:20 gabrieljenik Assigned To gabrieljenik => DenisChenu
2022-11-30 15:20 gabrieljenik Status assigned => ready for code review
2022-11-30 15:21 gabrieljenik Note Added: 72942
2022-11-30 15:24 gabrieljenik Issue cloned: 18530
2022-11-30 15:42 DenisChenu Assigned To DenisChenu => gabrieljenik
2022-11-30 15:42 DenisChenu Status ready for code review => in code review
2022-11-30 15:42 DenisChenu Note Added: 72943