Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1728441

Summary: hammer report-template list gives 404 if called with saved default organization or location
Product: Red Hat Satellite Reporter: gtaylor
Component: ReportingAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.5.0CC: arahaman, aruzicka, bbuckingham, bkearney, david.logan, inecas, jcallaha, katello-qa-list, mhulan, mmithaiw, mshira, oprazak, oshtaier, pondrejk, rankumar, satellite6-bugs, sjayapra, wpinheir
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1368173 Environment:
Last Closed: 2020-06-09 10:48:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1368173    
Bug Blocks:    

Description gtaylor 2019-07-10 00:42:29 UTC
+++ This bug was initially created as a clone of Bug #1368173 +++

Description of problem:

-- running "hammer report-template list" returns:
404 Resource Not Found

Reproducer: 
hammer>  defaults add --param-value="1" --param-name="organization_id"
Added organization_id default-option with value 1.

hammer> defaults add --param-value="2" --param-name="location_id"
Added location_id default-option with value 2.

hammer> defaults list
----------------|------
PARAMETER       | VALUE
----------------|------
organization_id | 1
location_id     | 2
----------------|------

hammer> report-template list
404 Not Found

hammer> defaults delete  --param-name="organization_id"
organization_id was deleted successfully.

hammer> defaults delete  --param-name="location_id"
location_id was deleted successfully.

hammer> report-template list
----|------------------
ID  | NAME
----|------------------
433 | Applicable errata
434 | Host statuses CSV
436 | Registered hosts
435 | Subscriptions
----|------------------


Version-Release number of selected component (if applicable):

   satellite-6.5.0-11.el7sat.noarch

Additional info:
Customer also uses defaults.yml something like this:

# cat defaults.yml
---
:defaults:
  :organization:
    :value: acme
  :organization_id:
    :value: '1'

Expected results:
The command should work with the default organization and location settings

Comment 4 Adam Ruzicka 2019-07-10 06:37:58 UTC
The title talks about job templates, but all the commands mentioned are working with report templates. Just to clarify, which one is correct?

Comment 5 Adam Ruzicka 2019-07-10 06:39:33 UTC
Please disregard my previous comment, for some reason the email I got about this from bugzilla had wrong subject

Comment 7 Adam Ruzicka 2019-07-31 12:19:07 UTC
Created redmine issue https://projects.theforeman.org/issues/27480 from this bug

Comment 8 Shira Maximov 2020-06-09 10:48:44 UTC

*** This bug has been marked as a duplicate of bug 1680567 ***