[Dashboard] Unexpected behavior of fields in apps

Bug #1521535 reported by Tatiana Kholkina
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Fix Released
Medium
Tatiana Kholkina
Kilo
Fix Released
Medium
Tatiana Kholkina
Liberty
Fix Released
Medium
Tatiana Kholkina
Mitaka
Fix Released
Medium
Tatiana Kholkina

Bug Description

Steps to reproduce:
1. Choose an app which has few fields with type 'string', e.g. Docker Standalone Host.
2. Change type from 'string' to 'text' for on of the fields, e.g. DockerMirror.
3. Import uploaded package and run 'Quick deploy'
Now we have large field for docker mirror. But we also have a large field for hostname on the next form.

I have found that it happens because we assign value to static variable 'widget' of class Field (CharField):
https://github.com/openstack/murano-dashboard/blob/9f652cc878c9d72ef809bb770463732cedd4c999/muranodashboard/dynamic_ui/forms.py#L68

And then all next fields have widget Textarea instead of default TextInput.

Changed in murano:
assignee: nobody → Tetiana Lashchova (tlashchova)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano-dashboard (master)

Fix proposed to branch: master
Review: https://review.openstack.org/251739

Changed in murano:
status: New → In Progress
Changed in murano:
importance: Undecided → Medium
milestone: none → mitaka-1
Stan Lagun (slagun)
tags: added: kilo-backport-potential liberty-backport-potential
Changed in murano:
milestone: mitaka-1 → mitaka-2
Changed in murano:
assignee: Tetiana Lashchova (tlashchova) → Kirill Zaitsev (kzaitsev)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano-dashboard (master)

Reviewed: https://review.openstack.org/251739
Committed: https://git.openstack.org/cgit/openstack/murano-dashboard/commit/?id=88abc05d2401c1b3e163502923611c7d03c88d35
Submitter: Jenkins
Branch: master

commit 88abc05d2401c1b3e163502923611c7d03c88d35
Author: Tetiana Lashchova <email address hidden>
Date: Tue Dec 1 11:33:45 2015 +0200

    Do not assign a value to the class variable 'widget'

    Class variable 'widget' stores a default widget for CharField.
    It is dangerous to change it. This patch fixes this and assigns
    a value to instance variable.

    Change-Id: I7220dcacd64aeee096e9340dc49bb4c5ebcfefd5
    Closes-Bug: #1521535

Changed in murano:
status: In Progress → Fix Released
Changed in murano:
assignee: Kirill Zaitsev (kzaitsev) → Tetiana Lashchova (tlashchova)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano-dashboard (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/254674

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano-dashboard (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/254681

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano-dashboard (stable/kilo)

Reviewed: https://review.openstack.org/254681
Committed: https://git.openstack.org/cgit/openstack/murano-dashboard/commit/?id=b126c5e5c1b83e21bcbb1782cf0b1c3460abac7e
Submitter: Jenkins
Branch: stable/kilo

commit b126c5e5c1b83e21bcbb1782cf0b1c3460abac7e
Author: Tetiana Lashchova <email address hidden>
Date: Tue Dec 1 11:33:45 2015 +0200

    Do not assign a value to the class variable 'widget'

    Class variable 'widget' stores a default widget for CharField.
    It is dangerous to change it. This patch fixes this and assigns
    a value to instance variable.

    Change-Id: I7220dcacd64aeee096e9340dc49bb4c5ebcfefd5
    Closes-Bug: #1521535
    (cherry picked from commit 88abc05d2401c1b3e163502923611c7d03c88d35)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano-dashboard (stable/liberty)

Reviewed: https://review.openstack.org/254674
Committed: https://git.openstack.org/cgit/openstack/murano-dashboard/commit/?id=b23495f95ad19c04bbd0e011bd308d89f60d2db7
Submitter: Jenkins
Branch: stable/liberty

commit b23495f95ad19c04bbd0e011bd308d89f60d2db7
Author: Tetiana Lashchova <email address hidden>
Date: Tue Dec 1 11:33:45 2015 +0200

    Do not assign a value to the class variable 'widget'

    Class variable 'widget' stores a default widget for CharField.
    It is dangerous to change it. This patch fixes this and assigns
    a value to instance variable.

    Change-Id: I7220dcacd64aeee096e9340dc49bb4c5ebcfefd5
    Closes-Bug: #1521535
    (cherry picked from commit 88abc05d2401c1b3e163502923611c7d03c88d35)

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/murano-dashboard 2015.1.1

This issue was fixed in the openstack/murano-dashboard 2015.1.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

This issue was fixed in the openstack/murano-dashboard 2015.1.1 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.