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

[QA] Conversion en nombre entier pour le nombre de personnes #2368

Merged
merged 2 commits into from
Mar 26, 2024

Conversation

emilschn
Copy link
Collaborator

@emilschn emilschn commented Mar 22, 2024

Ticket

#2251

Description

Certaines personnes saisissent un nombre float pour le nombre de personnes (Ex : 3.5). On l'arrondit à l'entier supérieur.
Le ticket signale une autre conversion, mais elle a été corrigée par ailleurs.

Tests

  • Entrer un nombre de personnes avec décimale et vérifier l'arrondi à l'unité supérieure
    EDIT
  • Entrer un nombre de pièce avec décimale et vérifier l'arrondi à l'unité supérieure
  • Entrer un nombre d'étage dans information complémentaire et vérifier l'arrondi à l'unité supérieure

Copy link
Collaborator

@hmeneuvrier hmeneuvrier left a comment

Choose a reason for hiding this comment

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

Test et relecture OK.
Mais je me demande s'il ne faut pas faire la même chose pour le nombre de pièces ? (je me suis trompée en testant, et je me suis rendue compte qu'on pouvait aussi mettre un float pour le nombre de pièces)

if (!empty($compositionLogementNombrePersonnes) && is_numeric($compositionLogementNombrePersonnes)) {
$compositionLogementNombrePersonnes = ceil($compositionLogementNombrePersonnes);
}

$this->signalement
->setTypeCompositionLogement(
$this->typeCompositionLogementFactory->createFromSignalementDraftPayload($this->payload)
Copy link
Collaborator

Choose a reason for hiding this comment

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

A corriger aussi dans le champs type_composition_logement
image

Le plus efficace serait de gérer ça dans le normalizer

Copy link

sonarcloud bot commented Mar 26, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Collaborator

@hmeneuvrier hmeneuvrier left a comment

Choose a reason for hiding this comment

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

Relecture et retests OK

Copy link
Collaborator

@numew numew left a comment

Choose a reason for hiding this comment

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

Ok

@numew numew merged commit 344b5b5 into develop Mar 26, 2024
3 checks passed
@hmeneuvrier hmeneuvrier deleted the fix/2251-float-int branch April 11, 2024 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants