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

[FIX] beesdoo_shift_swap: Prevent a skip of subsequent items #534

Open
wants to merge 1 commit into
base: 12.0
Choose a base branch
from

Conversation

carmenbianca
Copy link
Collaborator

Description

Modifying a list while looping over it is not allowed. It causes subsequent items to be skipped.

I suspect that this is the cause of a bug where a person who wants to swap a shift is correctly unsubscribed from their old shift, but not subscribed to their new shift. But I have not been able to verify this.

It is not clear to me why this code exists.

Odoo task (if applicable)

T12851

Checklist before approval

  • Tests are present (or not needed).
  • Credits/copyright have been changed correctly.
  • Change log snippet is present.
  • (If a new module) Moving this to OCA has been considered.

Modifying a list while looping over it is not allowed. It causes
subsequent items to be skipped.

I suspect that this is the cause of a bug where a person who wants to
swap a shift is correctly unsubscribed from their old shift, but not
subscribed to their new shift. But I have not been able to verify this.

It is not clear to me why this code exists.

Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Copy link
Collaborator

@polchampion polchampion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successful functional test on fhmunich-test: no side-effect detected

@polchampion
Copy link
Collaborator

@remytms can you review?

Copy link
Member

@huguesdk huguesdk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change seems correct to me, even though i don’t know much about the code.

@huguesdk
Copy link
Member

/ocabot merge patch

@github-grap-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 12.0-ocabot-merge-pr-534-by-huguesdk-bump-patch, awaiting test results.

github-grap-bot added a commit that referenced this pull request Sep 24, 2024
Signed-off-by huguesdk
@github-grap-bot
Copy link
Contributor

@huguesdk your merge command was aborted due to failed check(s), which you can inspect on this commit of 12.0-ocabot-merge-pr-534-by-huguesdk-bump-patch.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

Copy link
Member

@huguesdk huguesdk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@carmenbianca some tests are failing but i don’t know whether it’s because of the change. would you please check this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants