Fedora Account System
Red Hat Associate
Red Hat Customer
Created attachment 388809 [details] Compatible groups sorted by Description^1 ... then why aren't the blank descriptions together? Description of problem: Clicking on the column heading (Description) to sort compatible groups does not always sort the table rows in the expected 1st ascending nor descending order. Version-Release number of selected component (if applicable): This bug has been observed since I started looking at JON 22, 23, iManage... How reproducible: This bug was detected by an automated GUI test script... SortTableByColumnTests.java Steps to Reproduce: See the attached screenshot to see the types of compatible groups that are being sorted by Description. Note that some rows have blank Descriptions. These rows are not getting sorted together as one would expect.
Sorting on description is no longer allowed in the new inventory browser. More useful will be the ability to search the contents of the description.
The same sort by Description defects in Comment #1 have been observed for Mixed Groups.
I notice that the ones on top are manual groups, while the bottom guys are dynagroups. This phenomenon might be due to one set having a null description, while another has an empty string (or string entirely of whitespace).
Used your reproduction steps and then confirmed my suspicions by executing: "select rg.name, rg.description from rhq_resource_group rg" Using the "/admin/test/sql.jsp" page, which is only accessible as the admin user.
This is fixed in the search branch ( f6e7d87f6cb8b2a3129b51d83781433abbcfa41d ) and in master ( 0e6f01cbdd137691a4292fe99f0e78ea8c8bf4b5 ). ----- normalize resource group descriptions: * add dbupgrade step to convert empty-string descriptions for existing groups into null descriptions * add hibernate @PrePersist/@PreUpdate hooks to force empty-string descriptions to be persisted as null note: by converting empty string descriptions to null descriptions, it gives consistent sorting between databases that treat empty-string and null as distinct entities (e.g. postgres) and those that interpret empty-string and null as being equivalent (oracle)
Note: this does not fix the problem immediately. You must run dbupgrade to fix the rows that are already bad in the database. Any new rows that are created with empty-string descriptions will automatically be persisted with null instead.
Mass-move to ON_QA
QA Verified -- we seem to be in good shape with these fields following upgrades.
Mass-closure of verified bugs against JON.