ManageIQ / ui-components

Angular UI Components for ManageIQ
Apache License 2.0
16 stars 52 forks source link

dialog-user: Move tagging fix from #412 to setDefaultValue #414

Closed himdel closed 5 years ago

himdel commented 5 years ago

(follow-up to #412)

The dialogField component should not be changing default_value, the dialogData service is the place where default_value gets set.

Otherwise, validations from dialog-user and from dialog-field will work with different values, which can cause invalid validations or validation loops.

(docs - https://github.com/ManageIQ/manageiq-ui-classic/wiki/Dialogs#dialog-user-tidbits)

https://bugzilla.redhat.com/show_bug.cgi?id=1729379

Cc @romanblanco @h-kataria

miq-bot commented 5 years ago

Checked commit https://github.com/himdel/ui-components/commit/403703b65ff20b3225ba5e35ab06f747718cbfc6 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 0 files checked, 0 offenses detected Everything looks fine. :cake:

simaishi commented 5 years ago

Hammer backport details:

$ git log -1
commit d934145909d7973395c70b568980a5200b632b37
Author: Harpreet Kataria <hkataria@redhat.com>
Date:   Wed Sep 4 15:00:12 2019 -0400

    Merge pull request #414 from himdel/fix412

    dialog-user: Move tagging fix from #412 to setDefaultValue
    (cherry picked from commit b224a5079f8e86de77e8ebc7c5cdace16b993355)

    https://bugzilla.redhat.com/show_bug.cgi?id=1749061
romanblanco commented 5 years ago

@himdel realizing now, that we don't allow setting a default value for Tag Control in Dialog Editor, the test (defaultValue === undefined) seems to be unnecessary to me, and I feel like we can just set the defaul_value on 0 every time.

simaishi commented 5 years ago

Ivanchuk backport details:

$ git log -1
commit 32c18f92db1a30f15f33e02aaf50d11e7f984541
Author: Harpreet Kataria <hkataria@redhat.com>
Date:   Wed Sep 4 15:00:12 2019 -0400

    Merge pull request #414 from himdel/fix412

    dialog-user: Move tagging fix from #412 to setDefaultValue
    (cherry picked from commit b224a5079f8e86de77e8ebc7c5cdace16b993355)

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1767836