Bug 1155096

Summary: CLI auto-complete doesn't correctly show enums that are defined inside a class
Product: [Other] RHQ Project Reporter: Michael Burman <miburman>
Component: CLIAssignee: Nobody <nobody>
Status: POST --- QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.13CC: hrupp
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 Michael Burman 2014-10-21 11:24:37 UTC
Description of problem: When using the remote CLI auto-complete with tabulator, it will incorrectly fill the data with only partial enum name, if that enum is declared inside a class.

Example: AlertDampening has two enums, Category and TimeUnits. Trying to use these as autocomplete rules will forget to include the AlertDampening part and fill the CLI with incorrect data, causing an error. 

rhqadmin@localhost:7080$ dampeningRules.category(Category.

Category.CONSECUTIVE_COUNT   Category.DURATION_COUNT      Category.INVERSE_COUNT       Category.NONE                Category.NO_DUPLICATES       Category.ONCE
Category.PARTIAL_COUNT
rhqadmin@localhost:7080$ dampeningRules.category(Category.DURATION_COUNT)
org.mozilla.javascript.EcmaError: ReferenceError: "Category" is not defined. (<Unknown source>#1) in <Unknown source> at line number 1
dampeningRules.category(Category.DURATION_COUNT) 
^

rhqadmin@localhost:7080$ dampeningRules.category(AlertDampening.Category.DURATION_COUNT)
AlertDampeningTemplate:

rhqadmin@localhost:7080$


Version-Release number of selected component (if applicable): 4.13-SNAPSHOT


How reproducible: Always


Steps to Reproduce:
1. Try to auto-complete an enum that's defined inside a class
2.
3.

Actual results: It auto-completes only the enum name, not the class it is defined inside.


Expected results: The class name should be infront of the enum name for this behaviour to work correctly.


Additional info:

Comment 1 Michael Burman 2014-11-07 11:01:41 UTC
Part of PR #143

Comment 2 Mike McCune 2016-03-28 23:05:20 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions