Bug 1048265 - Creating duplicate DRL silently overwrites
Summary: Creating duplicate DRL silently overwrites
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: CR1
: 6.0.0
Assignee: Toni Rikkola
QA Contact: Zuzana Krejčová
URL:
Whiteboard:
Depends On:
Blocks: 999950
TreeView+ depends on / blocked
 
Reported: 2014-01-03 14:43 UTC by Zuzana Krejčová
Modified: 2016-08-01 01:08 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:17:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1055642 0 high CLOSED Validation of DRL always fails with 'Duplicate rule name' error after saving the rule 2021-02-22 00:41:40 UTC

Internal Links: 1055642

Description Zuzana Krejčová 2014-01-03 14:43:33 UTC
Description of problem:
See summary above and step below.


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


Steps to Reproduce:
1. In some package of a project, create a DRL file. Via GUI or Git, doesn't matter.
2. Append some content to the file and save it.
3. In GUI, create the same file in the same project and package.
4. Reopen the file in the GUI.


Actual results:
File was silently overwritten, you get "Item successfully created" notification.


Expected results:
Pop-up with a warning, that such file already exists. No overwriting.


Additional info:
This seems to be issue only for the DRL files, e.g. Test Scenarios and Enumerations work as expected.
My guess is that the "feature" that automatically adds package declaration to each new DRL is somehow behind this.

Comment 2 manstis 2014-01-03 18:10:25 UTC
The cause was simple; we didn't check if the file existed before writing the content (with GIT if you write to a file that already exists you simply add a new version - hence the apparent "overwrite").

Comment 3 Edson Tirelli 2014-01-07 18:45:21 UTC
Toni, can you please cherry-pick this into 6.0.x as soon as the flags are set?

Comment 4 Toni Rikkola 2014-01-08 07:04:21 UTC
Will do.

Comment 5 Toni Rikkola 2014-01-08 07:07:05 UTC
(In reply to Toni Rikkola from comment #4)
> Will do.

6.0.x: https://github.com/droolsjbpm/drools-wb/commit/f2dcf0417


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