Bug 772040

Summary: SM GUI: search filters do not factor in date ranges
Product: Red Hat Enterprise Linux 5 Reporter: J.C. Molet <jmolet>
Component: subscription-managerAssignee: Michael Stead <mstead>
Status: CLOSED NOTABUG QA Contact: Entitlement Bugs <entitlement-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.8CC: bkearney, fsharath, jsefler, mstead, sforsber
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-15 15:16:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 771748, 807971    
Attachments:
Description Flags
A good start to a solution for this BZ. none

Description J.C. Molet 2012-01-05 18:02:19 UTC
Description of problem:
When using the search filter "have no overlap with existing subscriptions", it does not factor in the date ranges of your existing subscription vs the date you are searching for.

Version-Release number of selected component (if applicable):
subscription-manager-gnome-0.98.10-1.git.4.71f8f71.el5

How reproducible:
always

Steps to Reproduce:
1. Install a product that have available future and current subscriptions
2. Launch and register subscription-manager-gui
3. Add a year to your search date, and subscribe to a future subscription.
4. Change the date back to today, so that you are out of the future subscription's date range and search again.
  
Actual results:
If the filter "have no overlap with existing subscriptions" is enabled, you will not see the corresponding current subscription.  

Expected results:
That filter only acts on subscriptions that are active for the searched date.

Comment 1 RHEL Program Management 2012-01-09 14:56:49 UTC
This request was evaluated by Red Hat Product Management for inclusion in Red Hat Enterprise Linux 5.8 and Red Hat does not plan to fix this issue the currently developed update.

Contact your manager or support representative in case you need to escalate this bug.

Comment 2 Michael Stead 2012-03-28 16:38:37 UTC
Created attachment 573396 [details]
A good start to a solution for this BZ.

Comment 3 Michael Stead 2012-03-28 16:41:21 UTC
I began working on this as it was associated with 6.3 blocker bug. It was decided that it would be pushed to 5.9.

Moving back to NEW.

I've attached a patch for a good start to a solution.

We should also consider the effects of stacking/multi-entitlement on this filter as well.

Comment 5 RHEL Program Management 2012-04-02 10:51:55 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 7 Michael Stead 2012-07-24 18:45:16 UTC
Fixed in commit: af0f732dd87af27ce75b868e05ece2b25cc03641

Available in subscription-manager-1.0.11-1+

Comment 8 Sharath Dwaral 2012-08-02 14:06:32 UTC
Version:
# rpm -qa | egrep "subscription-manager|python-rhsm"
subscription-manager-1.0.11-1.git.10.ac56ecc.el5
subscription-manager-migration-1.0.11-1.git.10.ac56ecc.el5
subscription-manager-firstboot-1.0.11-1.git.10.ac56ecc.el5
subscription-manager-gui-1.0.11-1.git.10.ac56ecc.el5
subscription-manager-migration-data-1.11.2.2-1.git.2.c3c8e22.el5
python-rhsm-1.0.4-1.git.7.47e5112.el5

Steps to Reproduce:
1. Install a product that have available future and current subscriptions
2. Launch and register subscription-manager-gui
3. Add a year to your search date, and subscribe to a future subscription.
4. Change the date back to today, so that you are out of the future subscription's date range and search again.

Actual Result:
The subscription that was subscribed at a future date is not available at the current date.

Expected Result: 
The subscription that was subscribed at a future date should be available at a current date.


moving back to NEW

Comment 9 Michael Stead 2012-08-09 17:54:54 UTC
I'm not sure that the Actual and Expected are correct in comment 8.

If your search date is not within the 'Future' subscription's date range, then it should _not_ show up in the search results.

Please provide more information on how you are testing this. What product cert are you are using? Is it a test data cert?

Thanks.

Comment 10 Bryan Kearney 2012-08-10 19:35:29 UTC
agree.. per the description in 8 you would see the current subscription.