Bug 198007 - Moving multiple folders allows moving to themselves
Summary: Moving multiple folders allows moving to themselves
Status: CLOSED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P4 minor (vote)
Target Milestone: 2.0.1   Edit
Assignee: Kevin Doyle CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: contributed
Depends on: 198114
Blocks:
  Show dependency tree
 
Reported: 2007-07-26 14:23 EDT by Rupen Mardirossian CLA
Modified: 2011-05-25 07:51 EDT (History)
4 users (show)

See Also:


Attachments
Go through all files to be moved when checking if valid (4.10 KB, patch)
2007-08-02 16:07 EDT, Kevin Doyle CLA
mober.at+eclipse: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rupen Mardirossian CLA 2007-07-26 14:23:35 EDT
To replicate:

1)Create a folder in local -> folder1
2)Create 2 subfolders - > move1, move2
3)Select both folders -> Right click -> Move
4)In the dialog box you are not allowed to move the folders to move1, but are allowed to move them to move2.

If you press ok to move into the second subfolder... only the first one will be moved.  Although, niether should be allowed if I am not mistaken.


-----------Enter bugs above this line-----------

installation : eclipse-SDK-3.3RC4  
RSE install  : RSE-devdriver
java.runtime : Sun 1.5.0_06-b05
os.name:     : Windows XP 5.1, Service Pack 2
------------------------------------------------
systemtype   : Linux - dstore
------------------------------------------------
Comment 1 Martin Oberhuber CLA 2007-07-27 04:23:53 EDT
Looks like the validator for the move-to-location needs to
  1.) Be fed with the full selection of all source items to move
  2.) Check whether the destination folder to validate is a parent of any of
      the source folders chosen.

I think that the bug is minor - assigning to Kevin since you have dealt with Validators before, but it is really low priority IMHO.
Comment 2 Kevin Doyle CLA 2007-07-27 11:14:06 EDT
Also, there is the issue that when you select Move it selects the parent folder of the files to be moved and the Okay button is enabled, but should be disabled.  If you select another folder then go back to the parent folder the Okay button is disabled. 
Comment 3 Kevin Doyle CLA 2007-08-02 16:07:21 EDT
Created attachment 75263 [details]
Go through all files to be moved when checking if valid

Legal Message: I, Kevin Doyle, declare that I developed attached code from
scratch, without referencing any 3rd party materials except material licensed
under the EPL. I am authorized by my employer, IBM Canada Ltd. to make this
contribution under the EPL.
Comment 4 Xuan Chen CLA 2007-08-08 12:07:05 EDT
The patch looks good.

Just a bit confused with the following message (which is used when the source folder itself or its parent is selected as target folder):


Target folder cannot equal source folder:
Details: Attempting to move a file or folder to the same folder as it exists in is equivalent to a rename operation. Use the rename action for this.

The level one message is more applicatable to the situation where user selects the source folder as the target folder.
The level two message is more applicable to the situation where user selects the parent of the source folder as the target folder.

Maybe we need to open a bug to improve the message contents when translation is possible.

I will committ the patch.
Comment 5 Xuan Chen CLA 2007-08-08 12:09:49 EDT
Committed the patch.
Comment 6 Xuan Chen CLA 2007-08-08 12:23:15 EDT
I've committed the patch.
Comment 7 Rupen Mardirossian CLA 2007-08-09 17:25:39 EDT
I have verified that this defect has been fixed with the dev driver.  I am closing now.