Project

General

Profile

Bug #23847

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

Added by Kavita Gaikwad almost 4 years ago. Updated almost 4 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
API
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

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

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

History

#1 Updated by Tomáš Strachota almost 4 years ago

  • Category changed from Other commands to API
  • Description updated (diff)
  • 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
  • Project changed from Hammer CLI to Katello

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.

#2 Updated by Justin Sherrill almost 4 years ago

  • Status changed from New to Duplicate

#3 Updated by Justin Sherrill almost 4 years ago

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

#4 Updated by Jonathon Turel almost 4 years ago

  • Legacy Backlogs Release (now unused) set to 166

Also available in: Atom PDF