Bug 911386 - Service Level, Type does not display cleanly for subscriptions with no set service level
Summary: Service Level, Type does not display cleanly for subscriptions with no set se...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.10
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: beta
: 5.10
Assignee: Bryan Kearney
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel510 rhsm-2013
TreeView+ depends on / blocked
 
Reported: 2013-02-14 21:37 UTC by J.C. Molet
Modified: 2013-09-30 22:56 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
No description necessary
Clone Of:
Environment:
Last Closed: 2013-09-30 22:56:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screenshot of RHEL-70-GUI (279.96 KB, image/png)
2013-03-13 15:26 UTC, Sharath Dwaral
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1332 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2013-09-30 22:49:24 UTC

Description J.C. Molet 2013-02-14 21:37:50 UTC
Description of problem:
In subscription-manager-gui, in the list of all available subscriptions, there is a field "Service Level, Type" that lists the corresponding subscription's 

Version-Release number of selected component (if applicable):
subscription-manager-gui-1.8.2-1.git.13.3fdfb73.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. Register rhsm to a standalone candlepin with TESTDATA enabled.
2. Go to the all available subscriptions tab and update the search
3. click on any product with only a service_level and no service_type or or that has neither
  
Actual results:
With the case of subscriptoins that have neither (such as "Awesome OS Modifier") you will get "Support Level, Type: Not Set, "   where there is an extra unneeded comma

When you get a subscription with only a service level like "Shared File System" you will get "Support Level, Type: Layered, "  also with an extra comma

Expected results:
There shouldn't be a comma for a list with one item.

Additional info:
This code is in /src/subscription_manager/gui/widgets.py

Currently it looks like this: 

        display_level = support_level
        if support_level == "":
            display_level = _("Not Set")
        self._set(self.support_level_and_type_text, ", ".join([display_level, support_type]))

It should look something like this:

        display_level = support_level
        if support_level == "":
            display_level = _("Not Set")
        if support_type != "":
            display_level_and_type = ", ".join([display_level, support_type])
        else:
            display_level_and_type = display_level
        self._set(self.support_level_and_type_text, display_level_and_type)

Comment 2 Bryan Kearney 2013-02-19 13:06:30 UTC
commit 76a1f4b65f3bdd184887ab43bc5adc4219b0d37b
Author: J.C. Molet <jmolet>
Date:   Mon Feb 18 15:37:34 2013 -0500

    911386: Displaying combined Service Level and Type should handle empty values for both items

Comment 3 Sharath Dwaral 2013-03-13 15:26:18 UTC
Created attachment 709640 [details]
screenshot of RHEL-70-GUI

# rpm -qa | egrep "subscription-manager|python-rhsm"
subscription-manager-firstboot-1.8.4-1.el7.x86_64
python-rhsm-1.8.7-1.el7.x86_64
subscription-manager-1.8.4-1.el7.x86_64
subscription-manager-debuginfo-1.8.4-1.el7.x86_64
subscription-manager-gui-1.8.4-1.el7.x86_64
subscription-manager-migration-1.8.4-1.el7.x86_64

Please see the images attached. Verified for both senarios where only a service_level and no service_type or or that has neither.

VERIFIED

Comment 4 RHEL Program Management 2013-04-09 20:51:41 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 6 errata-xmlrpc 2013-09-30 22:56:21 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.

http://rhn.redhat.com/errata/RHBA-2013-1332.html


Note You need to log in before you can comment on or make changes to this bug.