Bug 1568609

Summary: subscription-manager help fixes needed for new "subscription-manager list --after" implementation
Product: Red Hat Enterprise Linux 7 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: low Docs Contact:
Priority: high    
Version: 7.6CC: csnyder, jhnidek, khowell, redakkan
Target Milestone: rcKeywords: EasyFix, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.21.5-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 10:36:03 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 John Sefler 2018-04-17 22:42:53 UTC
Description of problem:

To documentation issues....
1. After the implementation of RFE Bug 1479353 that introduced the new "--after" command line option to the list module, we need a description for it in the man page under the LIST OPTIONS.

2. On the command line help description for the new "--after", we need to re-work the trailing part of the message due to subscription-manager commit  2e4c2b8ab686bd240b99acb8d9c149e4aa7010d8 "Condition requiring --after and --all is unnecessary"


Version-Release number of selected component (if applicable):
subscription-manager-1.21.2-1

How reproducible:


Steps to Reproduce:
1.
[root@jsefler-rhel7 ~]# man -P cat subscription-manager | grep -A10 -- "--after"
[root@jsefler-rhel7 ~]# 

^^^ EXPECTED to find a description of the "--after" list option 


2.
[root@jsefler-rhel7 ~]# subscription-manager list --help | grep "after=AFTER" -A1
  --after=AFTER         show pools that are active on or after the given date;
                        only used with --available and --all


^^^ EXPECTED            only used with --available

Comment 2 John Sefler 2018-04-17 23:01:33 UTC
The bash completion is also missing....

[root@jsefler-rhel7 ~]# subscription-manager list --<TAB><TAB>
--all              --installed        --noproxy          --proxypassword
--available        --matches          --ondate           --proxyuser
--consumed         --match-installed  --pool-only        --servicelevel
--help             --no-overlap       --proxy  


^^^ EXPECTED to find "--after" in the bash completion list above

Comment 3 John Sefler 2018-04-18 11:05:31 UTC
I'd also like to suggest that the name of the "--after" option be changed to "--afterdate" to complement the "--ondate" option and to provide the user a clue that the option takes a date value.

Comment 6 Rehana 2018-08-21 06:18:07 UTC
Verifying on :
===========

subscription-manager-rhsm-certificates-1.21.7-1.el7.x86_64
subscription-manager-rhsm-1.21.7-1.el7.x86_64
subscription-manager-1.21.7-1.el7.x86_64


1. Man page now contains help for --afterdate option 

# man -P cat subscription-manager | grep -A3 -- "--after"
       --afterdate=YYYY-MM-DD
              Shows pools that are active on or after the given date. This is only used with the --available option.


2. Help is now updated stating the new option --afterdate should be only used with --available option

#  subscription-manager list --help | grep "afterdate=AFTER" -A2
  --afterdate=AFTER_DATE
                        show pools that are active on or after the given date;
                        only used with --available (example: 2018-08-21)


3. Tab completion now working for the new --afterdate option

# subscription-manager list --<TAB><TAB>
--afterdate        --available        --help             --matches          --no-overlap       --ondate           --proxy            --proxyuser        
--all              --consumed         --installed        --match-installed  --noproxy          --pool-only        --proxypassword    --servicelevel    

--afterdate is now listed the tab completion list of options 


Also as suggested in comment 3, the option --after is now changed to --afterdate

Based on the above observations, moving the bug to verified.

Comment 9 errata-xmlrpc 2018-10-30 10:36:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3153