Bug 1531677 - Service Dialog Elements not sorting properly
Summary: Service Dialog Elements not sorting properly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - Service
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: GA
: 5.9.1
Assignee: Chris Hale
QA Contact: Shveta
URL:
Whiteboard: dialog
Depends On: 1519358
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-05 19:00 UTC by Satoe Imaishi
Modified: 2018-04-11 17:47 UTC (History)
15 users (show)

Fixed In Version: 5.9.1.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1519358
Environment:
Last Closed: 2018-04-11 17:46:34 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
image1_dropdown_issues (373.53 KB, image/png)
2018-02-16 12:40 UTC, Yadnyawalk Tale
no flags Details
image2_radiobutton_issues (348.79 KB, image/png)
2018-02-16 12:41 UTC, Yadnyawalk Tale
no flags Details
image3_none_thing _issue (186.78 KB, image/jpeg)
2018-02-16 12:42 UTC, Yadnyawalk Tale
no flags Details
Sorting in OPS UI (186.05 KB, image/png)
2018-03-16 16:18 UTC, Shveta
no flags Details
Sorting in Service UI (159.17 KB, image/png)
2018-03-16 16:22 UTC, Shveta
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1547231 0 medium CLOSED Different sorting behavior in dialog demo screen and running dialogs 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2018:0556 0 None None None 2018-04-11 17:47:11 UTC

Internal Links: 1547231

Comment 2 Satoe Imaishi 2018-02-12 18:10:20 UTC
In ui-components 1.0.4:
https://github.com/ManageIQ/manageiq-ui-classic/pull/3175

Comment 3 Yadnyawalk Tale 2018-02-16 12:40:09 UTC
Created attachment 1396999 [details]
image1_dropdown_issues

There are main four locations were I tested dialog - 

A. Services > Catalog > 'Service Catalogs' accodion, order (run) your dialog
B. From SSUI	
C. Automation > Automate > Customization > 'Service Dialogs' accordion (from Sample tab)
D. New Dialog Editor (from Automation > Automate > Customization > 'Service Dialogs' accordion, edit this dialog)

Location A and SSUI only 'runs' dialog, remaining cases only preview/demo dialog. Also note, SSUI have same use-case as OPS. 

***

Three main issues found (Check image1 and image2) - 
-------------------------------------------------

1. For dropdown and radiobutton, when value==int, sortby==description, order==descending
	Expected result -> 1,2,3,9,10,11 | Appering -> 1,10,11,2,3,9
2. For dropdown and radiobutton, when value==int, sortby==description, order==acending
	Expected result -> 11,10,9,3,2,1 | Appering -> 9,3,2,11,10,1
3. Sorting behavior of Preview/Demo dialog (C and D locations) is not same as Running dialog (A and B locations) 

***

Suggestion - 
------------

Current usecase of `Sort by` dropdown values are:
1. `Value` of `Sort by` option == `Keys` of `Entries` option
2. `Description` of `Sort by` option == `Values` of `Entries` option

(Just read it > `Values` of `Sort by` are not `Values` of `Entries`, this are `Keys` of `Entries` and `Description` of `Sort by` are `Values` of `Entries`, confusing..)

Expected -> `Sort by` and `Entries` dropdown should consist same values i.e. 1. Key and 2. Value. (Instead of Description-Value, Key-Value)

Comment 4 Yadnyawalk Tale 2018-02-16 12:41:02 UTC
Created attachment 1397000 [details]
image2_radiobutton_issues

Comment 5 Yadnyawalk Tale 2018-02-16 12:42:47 UTC
Created attachment 1397001 [details]
image3_none_thing _issue

Need info -  
---------

A] Please confirm business logic for <none> thing here. (image3)
1. When sorting is ascending <none> is at top.
2. When sorting descending <none> is at bottom (?)

First is obviously expected use case, but what should be business logic for A[2] here.
Personally, <none> should always be at top regardless any order..

`Default option` of dropdown element is always placed on top and In Edit Field Details form, `Default value` option always set to `None` too (None by default). This logic also supports, <none> always be present at top regardless order. Please conform?

Comment 6 Yadnyawalk Tale 2018-02-16 12:44:03 UTC
@Chris, about mentioned issue need to be fix. Thanks!

Comment 8 Chris Hale 2018-02-20 18:32:35 UTC
Ok, addressing Comment #3 https://bugzilla.redhat.com/show_bug.cgi?id=1531677#c3

There are a few things mistyped in that comment and I want to clarify what has been addressed and what still needs to be addressed. 

1. For dropdown and radiobutton, when value==int, sortby==description, order==descending
	Expected result should be -> 11,10,9,3,2,1  (Please see my GH PR to view this sorting in SUI)
2. For dropdown and radiobutton, when value==int, sortby==description, order==acending
	Expected result should be -> 1,2,3,9,10,11 (Please see my GH PR to view this sorting in SUI)
3. I can confirm your observation of dropdowns not sorting in dialog demo screen.  Please open up a BZ for Classic UI to address this issue. 

I also fixed that None show up at the top of a drop down no matter how it is sorted.  

Please reference https://github.com/ManageIQ/ui-components/pull/265 to view screenshots. 

I will post a follow up PR when this PR has been pushed, the version of UI-components has been bumped, and I have integrated this into service UI for validation.

Comment 10 Yadnyawalk Tale 2018-02-20 19:52:41 UTC
Raised BZ1547231 for preview/running dialog issue in Classic UI.
Thanks for corrections!

Comment 11 Chris Hale 2018-02-20 20:25:39 UTC
So for clarification on what follow up PR's are needed for this issue to be closed from the comment I made in https://bugzilla.redhat.com/show_bug.cgi?id=1531677#c8 .  Below are the steps that exist. 

1. https://github.com/ManageIQ/ui-components/pull/265 needs to be reviewed and merged
2. The PR needs to be backported to G release.
3. We need to push a new version of UI-components to NPM (will likely be version 1.0.16)
4. After the version bump occurs, we will create a PR in Service UI repo to use that new version of ui-components.  
5.  That PR will need to be backported and an appliance will need to be built and tested to validate issue is resolved.

Comment 12 Chris Hale 2018-02-21 19:14:56 UTC
Ok, GH PR https://github.com/ManageIQ/manageiq-ui-service/pull/1389 is the PR that bumps the version of ui-components with the fix for sorting drop downs in the SUI.

Comment 13 Allen W 2018-03-12 14:09:51 UTC
pr got merged, moving this to post

Comment 14 Shveta 2018-03-16 16:18:41 UTC
Created attachment 1408903 [details]
Sorting in OPS UI

Fixed in 5.9.1.0.20180314203929_67fd99d

Comment 15 Shveta 2018-03-16 16:22:41 UTC
Created attachment 1408904 [details]
Sorting in Service UI

Comment 18 errata-xmlrpc 2018-04-11 17:46:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0556


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