Bug 1693294 - Service Dialog values doesn't load on init also on manually refresh as well
Summary: Service Dialog values doesn't load on init also on manually refresh as well
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.10.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.11.0
Assignee: Martin Hradil
QA Contact: Niyaz Akhtar Ansari
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks: 1704905 1727989
TreeView+ depends on / blocked
 
Reported: 2019-03-27 13:24 UTC by Niyaz Akhtar Ansari
Modified: 2019-12-13 15:01 UTC (History)
11 users (show)

Fixed In Version: 5.11.0.14
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1727989 (view as bug list)
Environment:
Last Closed: 2019-12-13 15:01:07 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Niyaz Akhtar Ansari 2019-03-27 13:24:16 UTC
Description of problem:


Version-Release number of selected component (if applicable):
Verified in 5.10.2.1.20190318201733_b8aa100


How reproducible:
100%

Steps to Reproduce:
1.Add this Method
    dialog_hash = {1 => 'A', 2 => 'B' ,3 => 'C'}
    $evm.root['values'] = dialog_hash
    $evm.log('info', "XXX values: #{dialog_hash}")
    $evm.root['default_value'] = dialog_hash.keys
    $evm.log('info', "XXX default value: #{dialog_hash.keys}")
    exit MIQ_OK

2.Add dialog with
    set entry point to the newly created instance
    enable Show Refresh Button
    enable Load values on init
    enable Multiselect
3.Create catalog item
4.Order new catalog item 


Actual results:
values doesn't load on a refresh also it doesn't load on init

Expected results:
It should load values

Additional info:

Comment 2 Tina Fitzgerald 2019-03-27 13:41:20 UTC
Hi Niyaz,

Can you provide a reproducer environment?

Thanks,
Tina

Comment 3 Niyaz Akhtar Ansari 2019-03-27 13:45:16 UTC
Tina,

This issue is part of this one https://bugzilla.redhat.com/show_bug.cgi?id=1686038#c6
please have a look the comments.  

Thanks,
Niyaz

Comment 10 CFME Bot 2019-06-18 19:48:25 UTC
New commit detected on ManageIQ/ui-components/master:

https://github.com/ManageIQ/ui-components/commit/93b24358ed433156ca2785a1cc8c744e740a13ae
commit 93b24358ed433156ca2785a1cc8c744e740a13ae
Author:     Martin Hradil <mhradil>
AuthorDate: Mon Jun 17 09:32:10 2019 -0400
Commit:     Martin Hradil <mhradil>
CommitDate: Mon Jun 17 09:32:10 2019 -0400

    dialog-user: DialogFieldDropDownList: use ng-options & miq-options

    <option> can only work with string values,
    ng-options can handle integers, but omits data-token for searching,
    ng-options + miq-options should handle both

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

 src/dialog-user/components/dialog-user/dialogField.html | 22 +-
 1 file changed, 8 insertions(+), 14 deletions(-)

Comment 11 Martin Hradil 2019-06-19 09:39:28 UTC
(The issue with integer fields was fixed in https://github.com/ManageIQ/ui-components/pull/394,
only the issue with reloading multiselects dynamically remains now.)

Comment 16 CFME Bot 2019-07-08 18:13:30 UTC
New commits detected on ManageIQ/ui-components/master:

https://github.com/ManageIQ/ui-components/commit/b72bd77fb96d7c2545ea374480951bc9f34919a3
commit b72bd77fb96d7c2545ea374480951bc9f34919a3
Author:     Martin Hradil <mhradil>
AuthorDate: Mon Jul  8 05:47:25 2019 -0400
Commit:     Martin Hradil <mhradil>
CommitDate: Mon Jul  8 05:47:25 2019 -0400

    DialogUser $onInit - extract field initialization to initField method

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

 src/dialog-user/components/dialog-user/dialogUser.ts | 41 +-
 1 file changed, 22 insertions(+), 19 deletions(-)


https://github.com/ManageIQ/ui-components/commit/04716e9fef18b2335dc5f11af13b02abef004d2c
commit 04716e9fef18b2335dc5f11af13b02abef004d2c
Author:     Martin Hradil <mhradil>
AuthorDate: Mon Jul  8 05:49:34 2019 -0400
Commit:     Martin Hradil <mhradil>
CommitDate: Mon Jul  8 05:49:34 2019 -0400

    Dialogs - call initField from refreshFieldCallback, JSON.parse in setupField only when string

    initField needs to be called from refreshFieldCallback so that we don't run the initialization only on initial load, but also on every refresh from server - this makes initial loads and refreshes consistent

    setupField should only try to parse json multivalues when not already converted

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

 src/dialog-user/components/dialog-user/dialogUser.ts | 2 +
 src/dialog-user/services/dialogData.ts | 4 +-
 2 files changed, 5 insertions(+), 1 deletion(-)


Note You need to log in before you can comment on or make changes to this bug.