Ticket #4625 (closed: fixed)
CloneWorkspace fails when given a workspace group
Reported by: | Russell Taylor | Owned by: | Russell Taylor |
---|---|---|---|
Priority: | major | Milestone: | Release 2.1 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Wenduo Zhou |
Description
This in fact affects any algorithm that has a WorkspaceProperty<Workspace> input property (of which there aren't many). The problem code is at line 194 of Algorithm.cpp:
{ //check if the pointer is valid, it won't be if it is a group Workspace_sptr wsSptr=wsProp->getWorkspace(); if(!wsName.empty() && !wsSptr) { ...
Despite the comment, wsSptr is not null and so processGroups is not called.
This is easy to fix but it breaks (at minimum):
- SaveNexusProcessed - which has got around this incorrectly by calling processGroups from within its exec method.
- RenameWorkspace - which handles groups directly in its exec method.
Change History
comment:2 Changed 9 years ago by Russell Taylor
Remove code that stopped CloneWorkspace working on a group. Re #4625.
And was redundant anyway. More generally, it meant processGroups was not entered if the input property was of type WorkspaceProperty<Workspace>. This breaks some other things....fixes coming up.
Changeset: f43e3e0b9b11d9aa6c140a90139c96ac72cdf2b7
comment:3 Changed 9 years ago by Russell Taylor
Revert "Remove code that stopped CloneWorkspace working on a group. Re #4625."
This reverts commit f43e3e0b9b11d9aa6c140a90139c96ac72cdf2b7. I didn't expect it to break that much!
Changeset: 872c9494c5ee2358e007c0fd9a5200a7784b84bf
comment:4 Changed 9 years ago by Russell Taylor
Try again and rework to allow CloneWorkspace on a group. Re #4625.
Changeset: 94bd3b9fa360eb84d404f6b03f7226f78378dc9a
comment:5 Changed 9 years ago by Janik Zikovsky
Refs #4647 #4625 merging Algorithm.cpp
Changeset: f9c4d96583556048e70011cb310d8c8b802a4435
comment:6 Changed 9 years ago by Russell Taylor
Indentation fix only. Re #4625.
Changeset: 5cade213b27eeadc8cae4b6fa6dca523cd1e3c7c
comment:7 Changed 9 years ago by Russell Taylor
Add a test of cloning a workspace group. Re #4625.
Changeset: 0d472cc9347e46d1c7ed51d6a30bf080c3a1d74b
comment:8 Changed 9 years ago by Russell Taylor
Fix RenameWorkspace for groups and add a test. Re #4625.
It now renames members if they all follow the pattern groupName_1, groupName_2, etc. Otherwise only the group itself is renamed.
Changeset: 0d96d246c09f3c615ce01e77cc952f6b3f21d2bc
comment:9 Changed 9 years ago by Russell Taylor
- Status changed from accepted to verify
- Resolution set to fixed
Need to remember to update the wiki for RenameWorkspace, but shouldn't do that yet or it will be wrong for the upcoming release!
comment:10 Changed 8 years ago by Wenduo Zhou
- Status changed from verify to verifying
- Tester set to Wenduo Zhou
comment:12 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 5472