Skip to content

fix/validation on load on creation form - #1000

Open
renaudAmsellem wants to merge 2 commits into
developfrom
fix/valdiation-on-load-on-creation
Open

fix/validation on load on creation form#1000
renaudAmsellem wants to merge 2 commits into
developfrom
fix/valdiation-on-load-on-creation

Conversation

@renaudAmsellem

@renaudAmsellem renaudAmsellem commented Jul 22, 2025

Copy link
Copy Markdown
Collaborator

Replacement for #992
Ticket: https://aristid.atlassian.net/browse/LEAVC-150

Checklist

Definition Of Review

  • Own code review done (add notes for others)
  • Write message in teams channel
     <Title>
    
    *️⃣ Impacted projects : Core - DataStudio - Admin - @leav/ui - @leav/utils - ...
    
    📖 Ticket: https://aristid.atlassian.net/browse/<JIRA_TICKET_IDENTIFIER>
    
    🧑‍💻 PR: <link to PR/MR>
    
    ℹ Info: <brief explanation - context - how to test>
    

Definition Of Mergeable

  • 2 approves
  • 1 functional review - US has been tested
  • Every comment is handled - blocking ones have been resolved by reviewer
  • Design OK
  • Can be tested by POs
  • PR was introduced during daily meeting

if (backendValues.length === 0 && attribute.required) {
// Set field in error when TreeField is displayed for the first time. Otherwise, errors will be handled by other functions in this file.
// Set field in error when TreeField is displayed for the first time. Otherwise, errors will be handled by other functions in this file.
if (backendValues.length === 0 && attribute.required && formIdToLoad === 'edition') {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

issue: Ça marche bien pour les liens, mais pas pour les arbres ! Cependant peut-être que la solution est d'utiliser avoidFormValidationOnLoad de #992 pour cette condition (et éventuellement celle des liens).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

J'ai poussé le correctif et j'en ai profité pour supprimer un contexte inutile.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maintenant, lors de l'edition, les liens requis (qui ne sont donc pas dans le formulaire de création) n'ayant pas de valeur initiale restent en erreur même après une assignation. Pas de pb avec les arbre a première vue.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Cette partie va être grandement refactoré avec l'UX des liaisons. Je propose qu'on laisse ça comme ça et qu'on pense à bien faire attention à ça lors des devs.

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.

3 participants