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

Mission - Duplication de contrôles #3051

Closed
louptheron opened this issue Mar 27, 2024 · 1 comment · Fixed by #3052
Closed

Mission - Duplication de contrôles #3051

louptheron opened this issue Mar 27, 2024 · 1 comment · Fixed by #3052
Labels
bug Something isn't working

Comments

@louptheron
Copy link
Collaborator

louptheron commented Mar 27, 2024

Lors de la sauvegarde d'une mission contenant des contrôles, l'utilisation d'index lors de la sauvegarde par diff des contrôles modifie les identifiants id des contrôles.

Cas de reproduction :

  1. The first control in this test has the id 4
  2. A new control is added
  3. We save the form
  4. The bug was sending :
  • 1 POST request with the data of the first control (instead of an update of the id 4)
  • 1 PUT request with the date of the new control (instead of a creation with a POST request)

Cas étudiés

Cas 1:
Le contrôle du 2024-03-12T09:17:00Z.
MissionId : 11393
CFR: FRA000707251

Cas 2:
VesselId : 1728753
CFR: FRA000931328
Contrôle du 2024-03-19T09:45:00Z
Screenshot from 2024-03-27 19-03-05

Ils ont été supprimés le 26 :
Screenshot from 2024-03-27 19-06-37

@louptheron louptheron added the bug Something isn't working label Mar 27, 2024
@louptheron louptheron changed the title Creuser la raison de la duplication du contrôle Mission - Duplication de contrôles Mar 28, 2024
louptheron added a commit that referenced this issue Mar 28, 2024
## Linked issues

- Resolve #3051
- Resolve #3053

----

- [ ] Tests E2E (Cypress)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
- Enhanced the mission action deletion process to ensure accurate data
is sent to the API.
- **Refactor**
- Updated the internal logic for handling the creation, update, and
deletion of mission actions to improve efficiency and reliability.
- **Tests**
- Adjusted test cases to align with the new logic for managing mission
actions.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@louptheron
Copy link
Collaborator Author

L'id des actions n'est plus modifiée

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant