Project

General

Profile

Bug #23847

Updated by Tomáš Strachota almost 6 years ago

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1579413  

 This issue was originally reported in hammer bit in fact, it should be fixed on the API side. Note that this behavior occurs only when user tries to order by a field that's not defined in scoped search. 
 Hammer is still the easiest way of reproducing the problem, so I'm keeping the description as it was: 

 *Description of problem:* 

 During the usage of hammer command, some commands ( I've tested some ), returns a perfect output when running without --order parameter, Eg: 

 hammer> erratum list 
 -----|----------------|-------------|--------------------------------------------------------------------------------- 
 ID     | ERRATA ID        | TYPE          | TITLE                                                                            
 -----|----------------|-------------|--------------------------------------------------------------------------------- 
 3114 | RHBA-2018:1339 | bugfix        | tzdata enhancement update                                                        
 3113 | RHSA-2018:1318 | security      | Important: kernel security, bug fix, and enhancement update                      
 3107 | RHSA-2018:1278 | security      | Important: java-1.7.0-openjdk security update                                    

 If I try to order, by something like type, it returns an empty output table, using the example presented in documentation or some other: 

 hammer> erratum list --order type 
 ---|-----------|------|------ 
 ID | ERRATA ID | TYPE | TITLE 
 ---|-----------|------|------ 
 hammer> erratum list --order "type" 
 ---|-----------|------|------ 
 ID | ERRATA ID | TYPE | TITLE 
 ---|-----------|------|------ 
 hammer> erratum list --order "type desc" 

 Documentation Example: 
 https://access.redhat.com/documentation/en-us/red_hat_satellite/6.3/html-single/hammer_cli_guide/#chap-CLI_Guide-Managing_Content_Life_Cycle 

 8.1. Inspecting Available Errata 
 Example 8.1. Filtering Errata 


 *Version-Release number of selected component (if applicable):* SAtellite 6.3.1 RHEL 7.5 


 *How reproducible:* Always, test to run a command with --order parameter 


 *Steps to Reproduce:* 
 1. Install Satellite 
 2. Populate Satellite with some data 
 3. Use hammer with --order parameter 

 *Actual results:* 

 Empty output 


 *Expected results:* 

 Output ordered by arguments provided to --order 

 *Additional info:*

Back