Bug 1566888

Summary: Items can not be tagged to new category
Product: OpenShift Container Platform Reporter: XiaochuanWang <xiaocwan>
Component: Management ConsoleAssignee: Samuel Padgett <spadgett>
Status: CLOSED NOTABUG QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.9.0CC: aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
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: 2018-04-13 17:06:10 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 XiaochuanWang 2018-04-13 07:06:55 UTC
Description of problem:
Add js to configmap in openshift-web-console project, check the tagged items. They should have be tagged into new category by js.

Version-Release number of selected component (if applicable):
openshift-master/openshift-web-console: v3.9.20 

How reproducible:
Always

Steps to Reproduce:
1.Add the js to configmap in openshift-web-console project:
https://rawgit.com/openshift-qe/v3-testfiles/master/extensions/catalog-categories.js
2. When the container is ready, login on web-console, check if all items from database are also classified into 'My Category'

Actual results:
Items tagged with "databse" should be also classified into 'My Category'

Expected results:
Items tagged with "databse" is not classified into 'My Category'.

Additional info:
created new IS by https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/image-streams/httpd-istag.yaml could be tagged into 'My Category'.

Comment 1 Samuel Padgett 2018-04-13 17:06:10 UTC
The problem is that your category has a `tags` array and none of the tags in the category match any of the items. You can simply remove the tags array from the category, and the subcategory should match. For example,

window.OPENSHIFT_CONSTANTS.SERVICE_CATALOG_CATEGORIES.push(
  {id: 'mycat', label: 'My Category', subCategories: [
    {id: 'database', label: 'Database', tags: ['database']}
  ]}
)