Bug 183248

Summary: OrgImpl out of sync with is_org_paid stored procedure
Product: [Retired] Red Hat Network Reporter: Jesus M. Rodriguez <jesusr>
Component: RHN/Web SiteAssignee: Ryan Newberry <rnewberr>
Status: CLOSED CURRENTRELEASE QA Contact: Beth Nackashi <bnackash>
Severity: medium Docs Contact:
Priority: medium    
Version: rhn410CC: jslagle, mmccune, rhn-bugs, tsanders
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rhn414 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-09-20 14:49:40 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:    
Bug Blocks: 200021    

Description Jesus M. Rodriguez 2006-02-27 19:51:07 UTC
I am going to have to change the view, rhnPaidOrgs to account for the fact
that you no longer get 1 update slot for free.  The issue is that we don't
want orgs that are not paid, to show up as paid if we have to give them a
year free of update.  I was going to have to do some dirty hackery in the
view to make it work.  Once the view is right, rhn_bel.is_org_paid should be
right.

However, the java code doesn't seem to use this procedure, and rewrote the
logic of the view into the code in com/redhat/rhn/domain/org/OrgImpl.java.
Yes Yes, I know that you all hate using stored procedures, but it came back
and bit you  :) .  So once I fix the view, you can either incorporate whatever
I come up with into OrgImpl.java, or switch it to use rhn_bel.is_org_paid.  

I can't seem to think of a better way to determine if an org is paid except
to special case the scenario where they have 1 update slot, it matches the
SKU we gave for free and was granted by RHN on whatever day we run the
script in production.  Any other better ideas?

-- -- James Slagle --

Comment 1 Jesus M. Rodriguez 2006-02-27 19:52:21 UTC
I wrote a new view rhnDemoOrgs that will read from a log table that I'll be
populating during the removal script.  rhnPaidOrgs will now make use of
rhnDemoOrgs.

The change sql is at:
eng/schema/changes/dev/410/sql/rhnPaidOrgs.sql
eng/schema/changes/dev/410/sql/rhnDemoOrgs.sql

That java code needs to be updated accordingly.

Comment 2 Ryan Newberry 2006-04-05 21:34:59 UTC
Changed to use the stored proc in subversion. This code is not used in the Java
code anywhere yet.

Comment 3 Todd Sanders 2006-05-08 18:33:14 UTC
Reassign QA Responsibility to Partha Aji

Comment 4 Partha Aji 2006-05-17 22:23:19 UTC
Test Plan?

Comment 5 Ryan Newberry 2006-05-18 14:14:40 UTC
Aligning this against 411 as it is untestable in 410

Comment 6 Beth Nackashi 2006-07-30 13:42:08 UTC
I normally don't ask, but may I have a test plan please sir?

Comment 7 Jesus M. Rodriguez 2006-08-02 20:40:21 UTC
This is not a "testable" bug, it is one requiring code inspection.
I have verified that we now call the stored procedure.

Comment 8 Beth Nackashi 2006-09-20 14:49:40 UTC
closing -- current release.  RHN414 phase 14 gazillion is now in production.