View Issue Details

This bug affects 1 person(s).
 12
IDProjectCategoryView StatusLast Update
18460Feature requestsImport/Exportpublic2022-12-22 14:12
ReporterMazi Assigned Togabrieljenik  
PrioritynoneSeverity@60@ 
Status assignedResolutionopen 
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
Story point estimate
Users affected %

Relationships

related to 18509 feedbackc_schmitz Bug reports Permissions are gone after survey export/import 
related to 18544 closedgabrieljenik Bug reports Update Theme Options: Survey Group permissions are not checked correctly 

Users monitoring this issue

There are no users monitoring this issue.

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

ollehar

ollehar

2022-12-21 14:18

administrator   ~73239

Updated requirements to include UUID check. It won't be 100% tight, but will reduce the risk considerably to assign wrong survey group by mistake.

Moved to feature request.

Added comment on PR.

Mazi

Mazi

2022-12-21 14:58

updater   ~73243

@ollehar, did you move it to featrue requests since you feel it better fits there than at the bug reports?
Because if I get it right, we already have a (partial?) fix and that should be included in one of the next releases, correct?

ollehar

ollehar

2022-12-22 11:11

administrator   ~73263

Like Denis I have concerns about the security implications of automatically assigning survey groups.

One alternative would be to simply have a select box on the import page to choose which survey group to place the survey in, manually.

Mazi

Mazi

2022-12-22 11:12

updater   ~73264

@ollehar, that's a nice option as well, as long as we pre-set a matching group we found.

ollehar

ollehar

2022-12-22 11:14

administrator   ~73265

I guess pre-selecting the matching group could be a global setting...? Unless it's getting too complicated. @DenisChenu Thoughts?

DenisChenu

DenisChenu

2022-12-22 11:16

developer   ~73266

With a dropdown : idea :

  • Automatic (Same name , else default)
  • Default
  • others

With Automatic mean : by name inside the lss (if exist) if not : Default.

?

Mazi

Mazi

2022-12-22 11:17

updater   ~73267

I think we should not make it too complicated and add too many settings just for this minor detail.
The majority of the users (98%) just want the same group assigned if exists and for others if they can select "Default" or another group as an alternative, that covers everything.
You can easily change the group assignment afterwards as well.

DenisChenu

DenisChenu

2022-12-22 11:20

developer   ~73268

The majority of the users (98%) just want the same group assigned

Non, no, and clearly no ! It's only your experience

When copying : yes, but say that is totally false. I have client who really don't need this when import (on the contrary) .
For example, the client thanks to which we have the system of advanced rights on the groups.

You can easily change the group assignment afterwards as well.

Same if we set to default like we do since years now …

ollehar

ollehar

2022-12-22 12:02

administrator   ~73269

Sooo, setting in config-defaults then? To control if it pre-selects the matching group or the default group? But then we have to argue about the default value in that setting too.

Another option is a check-box, "Always pre-select the survey group from the import file" on the import page, that's per-user.

Mazi

Mazi

2022-12-22 12:16

updater   ~73270

I do not think that config-defaults is a good option because many users may not be able to adjust this and e.g. at some universities it is nearly impossible to persuade the IT team to make any changes.

Checkbox sounds good, especially if this is a user setting.

DenisChenu

DenisChenu

2022-12-22 12:18

developer   ~73271

Last edited: 2022-12-22 12:18

To control if it pre-selects the matching group or the default group?

If there are a dropdown : no issue, user must take care of it.

To control if it pre-selects the matching group or the default group?
Another option is a check-box, "Always pre-select the survey group from the import file" on the import page, that's per-user.

Both can be done by plugin, extension or theme after.

Just choose the default. I really we don't need a default update here.

Best is to have a default update on Export response (by user or by instance) for example.

gabrieljenik

gabrieljenik

2022-12-22 13:43

manager   ~73272

Last edited: 2022-12-22 14:01

So... @ollehar?
What are the directions then?

Checkbox on User Settings:

  • When importing surveys, keep the survey group from the source file
    Help Text: Please recall, when importing, survey group permissions may be inhertied to the imported survey.
    Default to Unchecked.

Dropdown:

  • Default
  • Keep survey group from imported file
  • SG1
  • SG2
  • ...
    To be filled according to list permission of survey groups
    To be preselected according to user setting

Like this?

ollehar

ollehar

2022-12-22 13:46

administrator   ~73274

@gabrieljenik What about having the checkbox on the import page instead of user settings?

gabrieljenik

gabrieljenik

2022-12-22 14:08

manager   ~73276

Last edited: 2022-12-22 14:09

Issue with checkbox in the import screen I believe is that most people will bypass it and use the default mostly.
That's why I like the idea of having a user setting. Although, we could be OK with out it too.

Consdering current situation, I believe we could be close to a suggestion from @Dennis and yourself.
Dropdown on import screen:

  • Import on Default Survey group (always preselected)
  • Keep the survey group from the source file
    Help Text: Please recall, when importing, survey group permissions may be inhertied to the imported survey.

If someone wants to use the source survey group, they would need to explicitly say so.
If we want to enhance the solution, we could add a list of available survey groups to the dropdown.

Thoughts?

Mazi

Mazi

2022-12-22 14:12

updater   ~73277

I like the suggestion + having a user setting for the default behavior!
All available survey groups (LS5: the user has permissions for) should be listed and the pre-selected option should be based on the user setting.

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
2022-12-06 20:22 gabrieljenik Issue cloned: 18544
2022-12-06 20:22 gabrieljenik Relationship added related to 18544
2022-12-13 14:32 gabrieljenik Assigned To gabrieljenik => ollehar
2022-12-13 14:32 gabrieljenik Status in code review => ready for merge
2022-12-21 14:17 ollehar Project Bug reports => Feature requests
2022-12-21 14:18 ollehar Note Added: 73239
2022-12-21 14:19 ollehar Assigned To ollehar =>
2022-12-21 14:19 ollehar Status ready for merge => new
2022-12-21 14:19 ollehar Assigned To => gabrieljenik
2022-12-21 14:19 ollehar Status new => assigned
2022-12-21 14:58 Mazi Note Added: 73243
2022-12-22 11:11 ollehar Note Added: 73263
2022-12-22 11:12 Mazi Note Added: 73264
2022-12-22 11:14 ollehar Note Added: 73265
2022-12-22 11:16 DenisChenu Note Added: 73266
2022-12-22 11:17 Mazi Note Added: 73267
2022-12-22 11:20 DenisChenu Note Added: 73268
2022-12-22 12:02 ollehar Note Added: 73269
2022-12-22 12:16 Mazi Note Added: 73270
2022-12-22 12:18 DenisChenu Note Added: 73271
2022-12-22 12:18 DenisChenu Note Edited: 73271
2022-12-22 13:43 gabrieljenik Note Added: 73272
2022-12-22 13:46 ollehar Note Added: 73274
2022-12-22 14:01 gabrieljenik Note Edited: 73272
2022-12-22 14:08 gabrieljenik Note Added: 73276
2022-12-22 14:09 gabrieljenik Note Edited: 73276
2022-12-22 14:12 Mazi Note Added: 73277