Project

General

Profile

Actions

Bug #23847

closed

Resusts of index requests ordered by a field that's not in scoped search returns empty output

Added by Kavita Gaikwad over 6 years ago. Updated over 6 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
API
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

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:


Related issues 1 (0 open1 closed)

Is duplicate of Katello - Bug #23512: switch to scoped_search based sortingResolvedActions
Actions

Also available in: Atom PDF