Ticket #6983 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Rename a whole list of workspaces

Reported by: Nick Draper Owned by: Karl Palmen
Priority: critical Milestone: Release 2.6
Component: GUI Keywords:
Cc: Blocked By:
Blocking: Tester: Gesner Passos

Description (last modified by Karl Palmen) (diff)

From Richard Heenan:

”rename” a whole list of workspaces, to either prefix or append a string onto their names, will make comparisons of methods or Mantid versions easier.

Suggested solution:

  1. create an algorithm (RenameWorkspaces) that can do this based on a comma seperated list of workspace names.
  2. Alter the workspace list to call this workspace rather than RenameWorkspace if multiple workspaces are selected when the right click rename option is used.

Ask Nick if this is not clear.

Change History

comment:1 Changed 7 years ago by Karl Palmen

When one selects several workspaces in the workspace window and then right-click to rename, then only the first workspace can be renamed. It is desired that the RenameWorkspaces would be called in such a case and as with a single workspace, the input workspace Box is read only.

The renameWorkspaces algorithm can call renameWorkspace as a child algorithm for each workspace with the output workspace name appropriately defined.

Last edited 7 years ago by Karl Palmen (previous) (diff)

comment:2 Changed 7 years ago by Karl Palmen

  • Status changed from new to assigned

comment:3 Changed 7 years ago by Karl Palmen

  • Status changed from assigned to accepted

comment:4 Changed 7 years ago by Karl Palmen

Add a compilable stub of RenameWorkspaces re #6983

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 96cf8164f2818276cbe76a7b9e9dc390d8b170b4

comment:5 Changed 7 years ago by Karl Palmen

Declare RenameWorkspaces Properties appropriately re #6983

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 0eed05542a5c2aee784506799c002e49d1e0e013

comment:6 Changed 7 years ago by Karl Palmen

Add check of RenameWorkspaces properties re #6983

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 43eb4c30cfe4bb7be300e0df026c6dd74ca08be5

comment:7 Changed 7 years ago by Karl Palmen

Begin unit test RenameWorkspacesTest.h re #6983

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: fa4eb99b7d53b07cf7b176ad1c853f749eae9d47

comment:8 Changed 7 years ago by Karl Palmen

Add unit test for invalid arguments re #6983

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: cf1b6b2c3c3c9a2853ce1fada59af7dc06b8cbee

comment:9 Changed 7 years ago by Karl Palmen

Add guts of RenameWorkspaces and extend unit test re #6983

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 4c73df67889c1d46d1bc95cdddeedb5329daf1ac

comment:10 Changed 7 years ago by Karl Palmen

Complete RenameWorkspacesTest.h re #6983

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: b6ee4df352fb38f231c4d841fbe892a9999d0bbb

comment:11 Changed 7 years ago by Karl Palmen

Add unit test to test execution for grouped workspace re #6983

This unit test currently fails.

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: c8c4ce1dfd00dace53b9cde029163afaf6ac730e

comment:12 Changed 7 years ago by Karl Palmen

Fix bug throwing exception for group workspaces re #6983

This required moving setProperty("OutputWorkspace", inputWS) within RenameWorkspace::processGroups().

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: afcf309b0bdb61c96a441cca0d2abdedac1d7359

comment:13 Changed 7 years ago by Karl Palmen

First step towards getting right-click menu functionality re #6983

I introduced a QStringList to convey the list of workspace names, currently just the first name is conveyed.

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: dc0c3c44cc70e86934ebd8eeb7099ef096b76445

comment:14 Changed 7 years ago by Karl Palmen

Use presets for InterfaceManager.createDialog re #6983

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: a7be11fe717f5ed7174f7397054628a9b20d99aa

comment:15 Changed 7 years ago by Karl Palmen

Multiple selection now uses RenameWorkspaces re #6983

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 8b9c463d3797ac0369fb64657bcc7a8f15b31205

comment:16 Changed 7 years ago by Karl Palmen

Ticket #7309 deals with the issue of ranaming a workspace with the same name as another workspace.

comment:17 Changed 7 years ago by Karl Palmen

Check for duplicate in WorkspaceNames re #6983

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 75a11df9268c38b88f7aacee59391decb1721e8d

comment:18 Changed 7 years ago by Karl Palmen

Unit test checks duplicate names re #6983

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 0811ee6d893ac2404775d5436108fefdd567f08b

comment:19 Changed 7 years ago by Karl Palmen

To test, load or create several workspaces, including at least one grouped workspace such as argus0031800.nxs and at least one single worskspace such as argus0026287.nxs.

Check that both the algorithms RanameWorkspace and RenameWorkspaces exist and work with sensible arguments.

Select a single workspace, right click and select Rename. Check that the dialog box for RenameWorkspace appears and it works with sensible arguments. Select several workspaces, right click and select Rename. Check that the dialog box for RenameWorkspaces appears and it works with sensible arguments.

Check for different argument combinations for RanameWorkspaces. See that it either works or gives an informative error message.

Do not rename any workspace to the name of an existing workspace. This matter is covered by ticket #7309.

comment:20 Changed 7 years ago by Karl Palmen

Clarify Wiki Description re #6983

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: b5aba34b24c1959ba7c9a1fd2de85b466248de76

comment:21 Changed 7 years ago by Karl Palmen

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:22 Changed 7 years ago by Gesner Passos

  • Status changed from verify to verifying
  • Tester set to Gesner Passos

comment:23 Changed 7 years ago by Gesner Passos

  • Status changed from verifying to closed

It does the job nicely. I have only one suggestion, that is to change the OptionalMessage (the message that goes to the yellow box on Algorithm Dialog). Being a new feature, it would be great to tell the user that he has to provide either a list of names as output, or the prefix, or the suffix for those files.

Something like:

this->setOptionalMessage("Rename the given Workspaces. Please, provide a list of names for the new workspaces, or give a suffix e/or a prefix and we will compose the new names for you.");

comment:24 Changed 7 years ago by Nick Draper

  • Component changed from Mantid to Framework

comment:25 Changed 7 years ago by Karl Palmen

  • Component changed from Framework to User Interface
  • Description modified (diff)

Component changed as indicated in release notes.

comment:26 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7828

Note: See TracTickets for help on using tickets.