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 1685368

Summary: [RFE] Report Template Info should include value of 'locked' attribute
Product: Red Hat Satellite Reporter: hprakash
Component: ReportingAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED CURRENTRELEASE QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.5.0CC: inecas, mhulan, oprazak, wpinheir
Target Milestone: UnspecifiedKeywords: FutureFeature
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: Environment:
Last Closed: 2019-12-17 10:13:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description hprakash 2019-03-05 03:59:01 UTC
Description of problem:
Report template information does not include 'Locked' attribute.

Version-Release number of selected component (if applicable):
satellite-6.5.0-6.beta.el7sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. Fetch report template info using any method given below-
# curl -X GET -k -u admin:<pwd> https://<sat-fqdn>/api/report_templates/<template-id> -H 'content-type: application/json'

OR 

# hammer report-template info --id <template-id>
2. the output of above curl/hammer does not have the value for 'Locked' attribute.


Actual results:
curl/hammer command to get the report template info, does not have the value for 'Locked' attribute.

Expected results:
'Locked' attribute should be displayed through API request and hammer output.

Additional info:
- from the webUI, it can be checked if report template is locked or not. 
- As a user, I may want to check if report template is locked or not from the API response or from the hammer output. 
- like the output of `hammer template info --id <template-id>` it would be good to include the 'Locked' attribute for report template.

Comment 3 Ondřej Pražák 2019-03-05 07:27:16 UTC
Created redmine issue http://projects.theforeman.org/issues/26230 from this bug

Comment 4 Waldirio M Pinheiro 2019-12-10 08:36:03 UTC
Hello folks,

I'm checking on Satellite 6.6 and the info is already there.

---
# hammer report-template list
----|--------------------------------------------------------------
ID  | NAME                                                         
----|--------------------------------------------------------------
112 | Applicable errata                                            
113 | Applied Errata                                               
171 | Hosts - compare content hosts packages                       
170 | Hosts - compare content hosts packages - old1                
169 | Hosts - compare content hosts packages only difference - old2
165 | Hosts - complete list                                        
114 | Host statuses                                                
167 | new01                                                        
115 | Registered hosts                                             
116 | Subscriptions                                                
166 | test                                                         
168 | xxx                                                          
----|--------------------------------------------------------------

# hammer report-template info --id 112
Id:              112
Name:            Applicable errata
Locked:          yes               <<<<<<<<<<<<<<<<<<<<<<<<<<<<
Default:         yes
Created at:      2019/11/20 17:49:52
Updated at:      2019/11/20 17:49:52
Locations:       
    BURNABY
Organizations:   
    ACME
Template inputs: 
 1) Name:        Hosts filter
    Description: Limit the report only on hosts found by this search query. Keep empty for report on all available hosts.
    Required:    no
 2) Name:        Errata filter
    Description: Limit the report only on errata found by this search query. Keep empty for report on all available errata.
    Required:    no
---


Note. On 6.5 I can't see the info indeed
---
# hammer report-template info --id 105
Id:              105
Name:            Applicable errata
Default:         yes
Created at:      2019/10/02 17:12:58
Updated at:      2019/10/02 17:12:58
Locations:       
    Burnaby
Organizations:   
    ACME
Template inputs: 
 1) Name:        Hosts filter
    Description: Limit the report only on hosts found by this search query. Keep empty for report on all available hosts.
    Required:    no
 2) Name:        Errata filter
    Description: Limit the report only on errata found by this search query. Keep empty for report on all available errata.
    Required:    no
---

Once this is available on 6.6, I believe this BZ can be closed. What do you think my friend?

Waldirio

Comment 5 Marek Hulan 2019-12-17 10:13:41 UTC
Thanks Waldirio for confirmation, closing this one now!