Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 911082

Summary: Rule Templates: Using number as template key name -> rules generated incorrectly
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Jan Hrcek <jhrcek>
Component: BRM (Guvnor)Assignee: manstis
Status: CLOSED UPSTREAM QA Contact:
Severity: low Docs Contact:
Priority: unspecified    
Version: BRMS 5.3.1   
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: 2025-02-10 03:27:27 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:
Attachments:
Description Flags
Steps to reproduce the problem none

Description Jan Hrcek 2013-02-14 10:27:57 UTC
Created attachment 697189 [details]
Steps to reproduce the problem

Description of problem:

When using "Rule Template" feature and using number as a template key name, the rules are generated by guvnor, that use the NAME of the template key, instead of the VALUES of the key entered in template data table.

Version-Release number of selected component (if applicable):
Version 5.3.1.BRMS-ER4

How reproducible:


Steps to Reproduce:
 See the printscreen in the attachment.

1. Using default sample repository supplied with guvnor, "Create New " > "New Rule Template", in package "mortgages". We Add a fact pattern to the WHEN part of the rule template and restrict the value of field value to be greater than given template key.

2. Use some number as a name of template key (e.g. 10000)

3. Fill in some template data in the table - e.g. 3 values 100, 200, 300 and save the template data.

4. Check the generated source code using "Source" > "View source".

  
Actual results:
There are 3 rules generated - one per each Template data row.
However number 10000 (i.e. template key NAME) is used in the rules, instead of 100, 200, 300 (i.e. template key VALUES as filled in the Template data).


Expected results:
It should be either:
     -Impossible to create template key named by number
     -OR when using number as template key name, the VALUES from template key should be used in the generated rules, NOT the template key's NAME.


Additional info:

In my oppinion the preferred behavior would be to restrict user from entering unacceptable names of template keys (like numbers, some special characters etc.).

When user would try such a name for a template key, appropriate warning should be displayed, such as: "Name of the template key must begin with letter" or so.

Comment 1 Geoffrey De Smet 2013-03-05 13:39:54 UTC
Reassign to the guvnor team, now that I am working full time on planner. So these issues aren't forgotten.

Comment 4 Red Hat Bugzilla 2025-02-10 03:27:27 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.