Bug 962634

Summary: 2 Data Providers with identical names can be created
Product: [Retired] JBoss BPMS Platform 6 Reporter: Jan Hrcek <jhrcek>
Component: BAMAssignee: David Gutierrez <dgutierr>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Hrcek <jhrcek>
Severity: low Docs Contact:
Priority: medium    
Version: 6.0.0CC: jhrcek, jschatte, rzhang
Target Milestone: ER1   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Two providers can be created with identical names without any feedback to the user Consequence: It becomes difficult to tell those providers apart Fix: Data provider management has been refactored so that this is now considered to be an error, and will be as such notified to the user Result: Whenever a user tries to create a new data provider with a name that is already in use (for the same locale), the creation is aborted and an error message is displayed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:09:43 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
2 providers with identical names created none

Description Jan Hrcek 2013-05-14 06:00:42 UTC
Description of problem:
When creating new Data providers using Data Provider Manager panel, it is possible to create 2 or more panels, that have the same name (see attached  screenshot)

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

How reproducible:
Always

Steps to Reproduce:
1. Navigate to workspace "Showcase", page "Data providers"
2. Create 2 new data providers, that have the same value in the "Name" field.
  
Actual results:
The providers with the same name are created successfully.

Expected results:
Input validation should be performed when user clicks on "Save" after filling in parameters of new data provider. For example an error message like "This name is already used" or "Data provider with this name already exists" should be displayed.

Since the choice of the data provider name is entirely up to user, he should be prevented to enter the same name for a new data provider as the name of some already configured Data provider. Because later, when he chooses which data provider he should choose for some KPI panel, or when he wants to delete some panel, it will not be clear to him which provider is which.

Comment 1 Jan Hrcek 2013-05-14 06:03:23 UTC
Created attachment 747521 [details]
2 providers with identical names created

Comment 2 Jan 2013-06-21 14:31:32 UTC
Creating data providers with already existing names is cannot be considered an actual error, since it will not jeopardise the correct working of the application. It is merely an issue of ease of use, motivated by the convenvience to be able to distinguish providers among each other. I'm therefore not 100% convinced that aborting the creation and notifying an error is adecuate.

How about this alternative approach instead ?
Upon creation, we still check if any of the proposed names (by locale!) is already in use, and if so, the conflicting one could be appended with, for example, "_" and a positive incremental integer. This way we still ensure the providers can be distinguished perfectly and chances are that this might suffice to the person defining the provider.

Comment 3 Jan Hrcek 2013-06-24 04:34:03 UTC
Yes, I think the solution you propose with appending "_" and some sequence nubmer is perfectly acceptable. This will be enough for user to be able to distinguish multiple providers with the same name.

Comment 4 Jan 2013-07-01 11:50:17 UTC
We proposed to provide some mechanism to automatically rename providers if a nome collision is detected. However, to avoid more time-loss and unnecessary complications (due to name-multlang), finally we go with your solution, i.e. trying to use a name that already exists will be considered an error, and will be notified to the user as such.

Comment 7 Jan Hrcek 2013-07-13 07:02:58 UTC
Now appropriate error message is given to the user when he tries to use data provider name that is already used. Verified with BPMS 6.0.0.DR6 deployed on EAP 6.1.