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

Block going to next step, also affects previous step? #4579

Closed
joeribekker opened this issue Aug 2, 2024 · 4 comments · Fixed by #4967
Closed

Block going to next step, also affects previous step? #4579

joeribekker opened this issue Aug 2, 2024 · 4 comments · Fixed by #4967
Assignees
Labels
bug Something isn't working needs-backport Fix must be backported to stable release branch
Milestone

Comments

@joeribekker
Copy link
Contributor

joeribekker commented Aug 2, 2024

Product versie / Product version

2.6.13

Customer reference

Taiga Hoorn 37

Omschrijf het probleem / Describe the bug

Je kunt na een keuze / waarde ervoor zorgen dat je niet verder mag gaan door: blokkeer doorgang naar volgende stap.

Hiervoor moet je aangeven dat dat blokkeren pas ingaat als je in een bepaald stap komt.

Maar als je terug gaat naar de Vorige stap (Uw gegevens) wordt de button daar geblokkeerd.
Waarschijnlijk omdat je al bij Aanvraag bent geweest. Het werkt blijkbaar niet vanaf Aanvraag

Heb van alles geprobeerd om dit op te heffen, maar het lukt mij niet om dit te de-blokeren.

Stappen om te reproduceren / Steps to reproduce

No response

Verwacht gedrag / Expected behavior

No response

Screen resolution

None

Device

None

OS

None

Browser

No response

@joeribekker joeribekker added bug Something isn't working triage Issue needs to be validated. Remove this label if the issue considered valid. labels Aug 2, 2024
@sergei-maertens
Copy link
Member

Refinement: likely related to the triggerFromStep optional constraint on a logic rule, where the detection of the "current" step is broken (looking at the most recent completed step rather than the step that is firing the logic check).

@sergei-maertens sergei-maertens added this to the Release 2.8.0 milestone Aug 19, 2024
@sergei-maertens sergei-maertens added needs-backport Fix must be backported to stable release branch and removed triage Issue needs to be validated. Remove this label if the issue considered valid. labels Aug 19, 2024
@joeribekker
Copy link
Contributor Author

Refinement: We will probably need to discuss this and scenarios to see what happens and what people expect to happen.

@stevenbal stevenbal moved this from Todo to In Progress in Development Oct 14, 2024
@stevenbal
Copy link
Contributor

Discussed with Sergei: I'll try to reproduce this and check if the inschakelen vanaf stap logic is a workaround for this issue. If it is, we could add a ValidationError to ensure that block going to the next step requires inschakelen vanaf stap to be set

image

@stevenbal stevenbal removed the discuss label Oct 14, 2024
@stevenbal
Copy link
Contributor

@sergei-maertens I checked this locally with the form from Hoorn, in their logic a user defined variable is set to "nee" based on input from step 1

image

and then in step 2 if this userdefined variable is "nee" (and the step is reached), the next step is blocked

image

which does mean that you cannot go to the next step anymore, because the step is considered reached if you reach it once and the variable can only be modified when going to the next step.

I'm not sure if this kind of logic is commonplace (setting a variable based on values from the previous step), but I think you're right that determining the current step in the logic is not working as it should

@stevenbal stevenbal moved this from Todo to In Progress in Development Dec 23, 2024
stevenbal added a commit that referenced this issue Dec 23, 2024
previously the current step was inferred by looking at the last completed step and considering the step after that the current step. This does not work however if you complete a step and go back to the previous step, so instead we explicitly pass the current form step via the serializer context
stevenbal added a commit that referenced this issue Dec 24, 2024
previously the current step was inferred by looking at the last completed step and considering the step after that the current step. This does not work however if you complete a step and go back to the previous step, so instead we explicitly pass the current form step via the serializer context
stevenbal added a commit that referenced this issue Dec 24, 2024
previously the current step was inferred by looking at the last completed step and considering the step after that the current step. This does not work however if you complete a step and go back to the previous step, so instead we explicitly pass the current form step via the serializer context
@stevenbal stevenbal moved this from In Progress to Implemented in Development Dec 24, 2024
sergei-maertens added a commit that referenced this issue Dec 27, 2024
…-to-next-step-bug

🐛 [#4579] Ensure triggerFromStep uses the correct current_step
@github-project-automation github-project-automation bot moved this from Implemented to Done in Development Dec 27, 2024
sergei-maertens pushed a commit that referenced this issue Dec 27, 2024
previously the current step was inferred by looking at the last completed step and considering the step after that the current step. This does not work however if you complete a step and go back to the previous step, so instead we explicitly pass the current form step via the serializer context

Backport-of: #4967
sergei-maertens pushed a commit that referenced this issue Dec 27, 2024
previously the current step was inferred by looking at the last completed step and considering the step after that the current step. This does not work however if you complete a step and go back to the previous step, so instead we explicitly pass the current form step via the serializer context

Backport-of: #4967
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-backport Fix must be backported to stable release branch
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants