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 #1

Updated by Tomáš Strachota over 6 years ago

  • Project changed from Hammer CLI to Katello
  • Subject changed from Hammer: Trying to order an output with --order returns empty output to Resusts of index requests ordered by a field that's not in scoped search returns empty output
  • Description updated (diff)
  • Category changed from Other commands to API

Even though it's been originally reported in hammer, the issue is Katello specific and exists in the API. I'm changing the project and category.

Actions #2

Updated by Justin Sherrill over 6 years ago

  • Status changed from New to Duplicate
Actions #3

Updated by Justin Sherrill over 6 years ago

  • Is duplicate of Bug #23512: switch to scoped_search based sorting added
Actions #4

Updated by Jonathon Turel over 6 years ago

  • Translation missing: en.field_release set to 166
Actions

Also available in: Atom PDF