Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resizing loop : lose every missing response #1045

Open
2 of 6 tasks
QRuhier opened this issue Jun 19, 2024 · 1 comment
Open
2 of 6 tasks

Resizing loop : lose every missing response #1045

QRuhier opened this issue Jun 19, 2024 · 1 comment
Labels
Type: Bug Something isn't working

Comments

@QRuhier
Copy link
Contributor

QRuhier commented Jun 19, 2024

Describe the bug

When we resize a loop (adding/deleting an iteration) , the remaining iterations keep there values, except their missing values

  • I tested it on the storybook, which leads me to believe that it's a lunatic bug.

To Reproduce

Steps to reproduce the behavior:

  1. questionnaire :
    issue_1045.json
  2. page 2 : set 1 person
  3. page 3, 4.1, 4.2 : give answer, then missing, then answer (whatever the order, it's just to have both for seing problem)
  4. go back to page 2 : change to 2 persons
  5. go back to the loop for your 1st person : the answers you gave remain 👍 but missings values have disappeared 👎

It is the same if for example you had 3 iterations then changed to 2 : the missings for the 2 remaining iterations disappear

Expected behavior

When resizing a loop, the remaining iterations should keep their answers, including missing responses

Version where the bug appeared

Observed on 3.1.0, but was already on 2.7

Browser where the bug was tested

  • Chrome
  • Firefox
  • Safari
  • Edge
  • Other (please specify): ___

Additional context

Add any other context about the problem here.

@QRuhier QRuhier added the Type: Bug Something isn't working label Jun 19, 2024
@Grafikart
Copy link
Collaborator

Le comportement est "normal" au vu du code :

Pour améliorer ce comportement une solution serait lors d'un resizing vers une valeur plus grande de ne pas changer directement la variable (ici T_AN) mais plutôt de définir une nouvelle valeur a un nouvel index. Cela implique donc de changer le comportement du resizing (à voir si c'est satisfaisant ou pas)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants