Ticket #8935 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

CloneWorkspace doesn't copy logs

Reported by: Keith Brown Owned by: Dan Nixon
Priority: major Milestone: Release 3.4
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Anders Markvardsen

Description

After cloning a workspace I've discovered that the logs are shared between the original and the clone, so altering the original also affects the clone.

I was running this script when I discovered this.

def correct_logs(ws):
    ws_log_names = mtd[ws].getRun().keys()
    if 'stheta' in ws_log_names and not 'theta' in ws_log_names:
        #create a copy of the original
        CloneWorkspace(InputWorkspace=ws,OutputWorkspace=ws+"_clone")
        RenameLog(Workspace=ws,OriginalLogName='stheta',NewLogName='theta')
    else:
        print "Nothing to correct."
correct_logs('POLREF00008481')

To reproduce Load POLREF00008481.nxs and check the sample logs for "stheta" and note that 'theta' doesn't exist, then run the script. Check the sample logs again on both POLREF00008481 and POLREF00008481_clone for stheta. It won't be present on either and theta will be present instead.

The way it should work is that the original should have been altered and have theta rather than 'stheta', while the clone should remain untouched and contain 'stheta' but not 'theta'

Change History

comment:1 Changed 7 years ago by Nick Draper

  • Status changed from new to assigned

bulk move to assigned at the into of the triage step

comment:2 Changed 5 years ago by Dan Nixon

  • Owner set to Dan Nixon
  • Milestone changed from Backlog to Release 3.5

comment:3 Changed 5 years ago by Dan Nixon

  • Status changed from assigned to inprogress

Fix rename log changing a cloned workspace

Refs #8935

Changeset: d1f882115be58a67fcc1472c58ae52dd6bae506c

comment:4 Changed 5 years ago by Dan Nixon

Add unit test for original fault

Refs #8935

Changeset: 8b7e70307e8b226922c73b7a879a7c216a53c8ae

comment:5 Changed 5 years ago by Dan Nixon

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

This is being verified as pull request #729.

comment:6 Changed 5 years ago by Dan Nixon

  • Milestone changed from Release 3.5 to Release 3.4

comment:7 Changed 5 years ago by Anders Markvardsen

  • Status changed from verify to verifying
  • Tester set to Anders Markvardsen

comment:8 Changed 5 years ago by Anders-Markvardsen

  • Status changed from verifying to closed

Merge pull request #729 from mantidproject/8935_fix_renamelog_bug

Fix bug in RenameLog

Full changeset: 5526eb6ae28d043de92d5db3332ae9f8b64c0dc2

comment:9 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9778

Note: See TracTickets for help on using tickets.