View Issue Details

This bug affects 1 person(s).
 12
IDProjectCategoryView StatusLast Update
11687Feature requestsSurvey editingpublic2019-11-26 17:36
Reporterjelo Assigned To 
PrioritynoneSeverityfeature 
Status newResolutionopen 
Summary11687: Looping
Description

Looping lets you specify a list and a group of questions to be asked for each member of that list.

Additional Information

https://www.sawtoothsoftware.com/help/lighthouse-studio/manual/hid_web_skips_2.html

TagsNo tags attached.
Bug heat12
Story point estimate
Users affected %

Users monitoring this issue

jelo, vkuzmin

Activities

ollehar

ollehar

2016-09-20 16:14

administrator   ~40858

Like label sets, but bind at survey creation.

DenisChenu

DenisChenu

2016-09-20 19:25

developer   ~40863

I have seen an hacked 1.92 version with "multiple group" : in some group you nhave "Add one more" : clicking on it add a group with exactly same question.

It's for event : in an event you can have 1,2,3 ... bands for example.

The code is very dirty ..... (and broken)

LouisGac

LouisGac

2016-09-21 10:45

developer   ~40874

So, here what was my idea:

  1. User creates a normal survey, for a single item.
  2. In each question he want to loop, he can use in title/question/subquestion/answer a replacement keyword like {{ loop/item }}
  3. When the survey is done, in survey summary, he can click on a button "loop"
  4. He reach a page, where he can create a list of items
  5. When the list of items is created, he can select the questions he want to loop
  6. Then, when he click "apply loop", the script generate a new survey, with a new name (like my_survey_loop_1). In this survey, each selected question will be duplicated for each item. The keywords {{ loop/item }} will be replaced by the current item.

It's possible to do this solution with the current database structure.

jelo

jelo

2016-09-21 11:38

partner   ~40875

I remember a feature request, where the copy and paste of questions should be automated. Better automated then doing it manually.

But the typical real world example is a multiple choice question with brands.
Which brands do you know?
The chosen items are the list which should be looped to the next questions.
That scenario is the simplest application for looping I know.
The typical approach in Limesurvey is to create a question for every brand and put relevance on the copied questions.

The Step 4 in your idea would work with additional lists.

When it comes to looping things can start to become really boring for respondents. In my example a respondent could have checked every brand, which would result in a lot of questions. In real world the looping is often done with a limit. The generated list for looping is manipulated to prevent too many questions. Often you have rules applied to the list. E.g choose 4 brands from the chosen ones. If there are main competitors chosen, keep them. If not, select randomly to fill up the slots. That is more about the dynamic list building ( https://bugs.limesurvey.org/view.php?id=11688 ), but it is heavily used in combination with looping to keep a question limit.

jelo

jelo

2016-09-21 11:38

partner   ~40876

This feature request is about the same:
https://bugs.limesurvey.org/view.php?id=7978

jelo

jelo

2016-09-21 11:39

partner   ~40877

@LouisGac: A looping copy approach was suggest here. Sound like a similar idea.
https://bugs.limesurvey.org/view.php?id=7544

DenisChenu

DenisChenu

2016-09-21 11:49

developer   ~40878

I like the idea for "loop a complete group" : think it's more easy for LS developper.

Exemple of GUI usage : in group edit:

  • Loop this group : (default 1)
    Can use Expression Manager in this input, must return a number > 0 (else 1) for example.

I think nthe second group can be saved in the same table with : all other value to "null", but fille the session by the original survey.

The survey line have a "original srid" column (and maybe "group copy id" too)

Denis

jelo

jelo

2016-09-22 00:09

partner   ~40910

Just to give an impression how looping is offered in a webbased gui take a look at this compact tutorial:
https://www.qualtrics.com/support/survey-platform/survey-module/block-options/loop-and-merge/

A "complete" looping function would allow the following example:
Question: How many movies did you watch this year?
The answer is a number.
Next questions are about each movie.
The amount of loops are determined by the answer of the first question.

DenisChenu

DenisChenu

2016-09-24 11:57

developer   ~40936

Last edited: 2016-09-24 11:58

@jelo about qualtrics system seems not a real looping :
"Each time you turn on Loop & Merge, you create Loop & Merge Fields. These fields are used to create dynamic text that is different for each loop."

A real looping must allow "infinite" looping.

PS : ok edited : "To Loop based on a Number"

jelo

jelo

2016-09-24 12:53

partner   ~40939

@DenisChenu: I don't understand the intention of your last note?
At least if it is for me and not for the other developers in the LS Team.

Since there are members of LS team which didn't know the term looping I provides some examples. Once the ground idea is clear, a concept suitable for LimeSurvey might be developed.

There are infinite and finite situations. And there is difference between providing a questions generator to save copy and paste work and a "real" looping routine in the code.

DenisChenu

DenisChenu

2016-09-24 13:11

developer   ~40940

Hi @jelo : i updated my comment. But infinite looping and finite looping are really completely different in DB andf in developpement.

The first example of qualtrics seems available today with some hack via a plugin, te infinite looping is not really doable without major hack.

jelo

jelo

2016-09-24 17:36

partner   ~40941

@DenisChenu: Wouldn't it be more fruitful to discuss feature requests in three steps:

1.) Focus only on the nature of the feature request. Goal would be to get an common sense of what the feature should provide. And define a scope and possible limits.

2.) Focus on the current codebase and the implication for developing the requested feature. Goal is to get a feeling, if the feature request can be done 1:1 with the current codebase. If a 100% realization isn't possible, define what is possible with the current codebase. And define what's needs to be changed at the core, database and third-party stuff to get it done 100%.

3.) Often we would end up with two feature requests. One, that is possible "today", one that needs a different codebase. Over time we'll get a better picture how a major overhaul of the codebase should look like. Goal would be to get more feature requests, which are ready for implementation. For current and future codebase.

To tag feature requests with e.g. "Codebase LS2.5" or "New codebase needed" would help to sort feature requests.

When it comes to looping I don't think step 1 is finished.

But let's say we limit the feature request on static looping.
Most of the time you could put a limit on a question during design.
What restrictions beside not being able to loop n times based on a number asked during the interview can be expected? If I tick three items in a multiple-choice question with other field, the looping with these items is a case for static looping.

LouisGac

LouisGac

2016-09-26 10:42

developer   ~40953

Last edited: 2016-09-26 10:44

@jelo
Dev is based on cycles:
http://www.mobiblossom.com/images/agile.png

Your point 1) depends on 2)...
Of course, you first need an "idea" of what you want, but the definition of your feature also depends on what you can do.

First iteration of point 1): we want a looping system, "kinda like" the one of qualtrics. That's precise enough for a first iteration. Then come the first iteration of point 2): is it possible with the current core/database? Will it need a lot of work?

From the answers to this point 2, we go back to point 1: it's possible, now, without too much effort, but it implies a workflow different from the qualtrics one. Two workflows have been proposed: a/The Denis group copying system, b/My system of copying survey. The pro and the cons of each one should (still) be debated. Also, we should debate if any of those solutions is good enough, and if we should rather make deeper changes in the kernel and the database before doing a true loop system (that's the Carsten POV)

Then, we'll go back to point 2/ for a second iteration: which one would be the easiest one to implement? How to implement it, etc.

Then, when start the dev, again we need new cycles.

jelo

jelo

2019-11-26 17:24

partner   ~54789

After three years the agility process might reached the next loop.

ollehar

ollehar

2019-11-26 17:36

administrator   ~54791

No. We just start another loop 1, again and again. ;D

Issue History

Date Modified Username Field Change
2016-09-20 16:04 jelo New Issue
2016-09-20 16:14 ollehar Note Added: 40858
2016-09-20 19:25 DenisChenu Note Added: 40863
2016-09-21 10:45 LouisGac Note Added: 40874
2016-09-21 11:38 jelo Note Added: 40875
2016-09-21 11:38 jelo Note Added: 40876
2016-09-21 11:39 jelo Note Added: 40877
2016-09-21 11:49 DenisChenu Note Added: 40878
2016-09-22 00:09 jelo Note Added: 40910
2016-09-23 21:54 jelo Issue Monitored: jelo
2016-09-24 11:57 DenisChenu Note Added: 40936
2016-09-24 11:58 DenisChenu Note Edited: 40936
2016-09-24 12:53 jelo Note Added: 40939
2016-09-24 13:11 DenisChenu Note Added: 40940
2016-09-24 17:36 jelo Note Added: 40941
2016-09-26 10:42 LouisGac Note Added: 40953
2016-09-26 10:43 LouisGac Note Edited: 40953
2016-09-26 10:44 LouisGac Note Edited: 40953
2016-11-11 11:11 vkuzmin Issue Monitored: vkuzmin
2019-11-01 17:25 c_schmitz Category Survey design => Survey editing
2019-11-26 17:24 jelo Note Added: 54789
2019-11-26 17:36 ollehar Note Added: 54791