Bug 962634 - 2 Data Providers with identical names can be created
2 Data Providers with identical names can be created
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: BAM (Show other bugs)
Unspecified Unspecified
medium Severity low
: ER1
: 6.0.0
Assigned To: David Gutierrez
Jan Hrcek
Depends On:
  Show dependency treegraph
Reported: 2013-05-14 02:00 EDT by Jan Hrcek
Modified: 2014-08-06 16:09 EDT (History)
3 users (show)

See Also:
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:
Last Closed: 2014-08-06 16:09:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
2 providers with identical names created (406.35 KB, image/png)
2013-05-14 02:03 EDT, Jan Hrcek
no flags Details

  None (edit)
Description Jan Hrcek 2013-05-14 02:00:42 EDT
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:

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 02:03:23 EDT
Created attachment 747521 [details]
2 providers with identical names created
Comment 2 Jan 2013-06-21 10:31:32 EDT
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 00:34:03 EDT
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 07:50:17 EDT
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 03:02:58 EDT
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.

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