Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 332957

Summary: Renaming an artifact with an existing resource name is being allowed
Product: z_Archived Reporter: Victor Atomitl Garcia Toral <atomitl>
Component: TPTPAssignee: Bozier jerome <jerome.bozier>
Status: CLOSED FIXED QA Contact: Kathy Chan <kathy>
Severity: normal    
Priority: P2 CC: atomitl
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows Server 2008   
Whiteboard:

Description Victor Atomitl Garcia Toral CLA 2010-12-20 10:50:15 EST
Build Identifier: 3.6.1 M20101201-0800 TPTP-4.7.2-201012121900

Test case "test name check on editor for existing resource" from Test.UI.TestNavigator.bugzilla_166025 is failling. It is possible to rename an artifact with the "resource name" of another existing artifact. 

Reproducible: Always

Steps to Reproduce:
1. Create an empty project
2. In previous project, create two artifacts, one named "a" and one named "b"
3. open editor of artifact "a", rename it (via editor) into "c". save the artifact (via editor).
4. open editor on artifact "b", put an empty name and try to save. Check that an error message appear and that save is not performed (editor stay in "dirty" mode)
Comment 1 Kathy Chan CLA 2010-12-20 15:44:37 EST
Victor,

Is this a regression from TPTP 4.7.1?

Tentatively targeting to 4.7.2.  Jerome, please take a look.
Comment 2 Bozier jerome CLA 2011-01-07 04:32:08 EST
ok, i can reproduce it but with theses steps :

Steps to Reproduce:
1. Create an empty project
2. In previous project, create two artifacts, one named "a" and one named "b"
3. open editor of artifact "a", rename it (via editor) into "c". save the
artifact (via editor).
4. open editor on artifact "b", put "a" as name and try to save. 
=> an error should appear in theory (as it is, save is really performed)

checking what is happening
Comment 3 Bozier jerome CLA 2011-01-07 06:10:42 EST
after some examination, i remind that we changed a bit the naming rules but we forgot to update the manual test

actual rules are :
. logical name is not empty
. logical name is be valid :
   - does not starts or ends with "-", " " or "."
   - does not contains ":", "\" or "/"
. logical name does not already exists under the same container

so, theses test should work :

1. Create an empty project
2. In previous project, create two artifacts, one named "a" and one named "b"
3. open editor of artifact "a", rename it (via editor) into "c". save the
artifact (via editor).
4. open editor on artifact "b", put an empty name and try to save. Check that
an error message appear and that save is not performed (editor stay in "dirty"
mode)
5. open editor on artifact "b", put "c" as name and try to save. Check that
an error message appear and that save is not performed (editor stay in "dirty"
mode)

will update manual test and will close bug when done
Comment 4 Bozier jerome CLA 2011-01-07 09:57:57 EST
manual test 166025 updated
closing
Comment 5 Bozier jerome CLA 2011-01-07 09:58:16 EST
updating worked time