Ticket #8734 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Use correct investigation ID in icat GUI

Reported by: Jay Rainey Owned by: Jay Rainey
Priority: critical Milestone: Release 3.1
Component: Framework Keywords: ICAT
Cc: Blocked By:
Blocking: Tester: Peter Parker

Description

Owen mentioned (via email):

The experiment ID associated with INTER file INTER00013470.nxs seems to be reported as 24088082, at least via the Mantid ICAT interface. However it is listed in the journal.xml files as 1120015 for that run. Any idea what is going on here, and which one I can trust?

The problem is that within ICat4Catalog I am not saving the investigation ID, but am instead saving the primary key from the database.

This can be fixed by replacing investigation->id with investigation->name in the saveInvestigations method in ICat4Catalog.

Change History

comment:1 Changed 7 years ago by Jay Rainey

  • Status changed from new to inprogress

Use the investigation ID for searching. Not db table ID. Refs #8734.

Changeset: 5d1162a70f0ca4499fb3c953b97bb214023a3835

comment:2 Changed 7 years ago by Jay Rainey

Unfortunately, some experiments return an investigation ID that is a string, for example:

  • CAL_GEM_2013-05-13T22:31:26
  • CAL_EMU_2012-11-22T12:18:48
  • CAL_WISH_2012-02-20T13:57:29

I have asked Tom about this, and he said:

"Yes, this is expected. These are calibration collections where there is no experiment number/proposal."

Therefore, I will need to change the related investigation method signatures in ICatalog.cpp that expect a long to now expect a string.

comment:3 Changed 7 years ago by Jay Rainey

Update catalog interface method signatures. Refs #8734.

  • Updated ICat4Catalog signatures and removed unnecessary cast.

Changeset: b737d17874a65ba5c5cbc6d0403caff7d414604d

comment:4 Changed 7 years ago by Jay Rainey

Updated related investigation algorithms signatures. Refs #8734.

Changeset: a4204f56d2a2552188e4e5a9eb8f1d01e7e0d910

comment:5 Changed 7 years ago by Jay Rainey

Updated GUI methods calling related algorithms. Refs #8734.

Changeset: 5b3e1be19bf39d6b15e4d560ae0b20c2f55dc789

comment:6 Changed 7 years ago by Jay Rainey

Updated ICat3Catalog's method signatures. Refs #8734.

Changeset: f2db737b89327df6d6b9c7eef0172cd809629f37

comment:7 Changed 7 years ago by Jay Rainey

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

Update catalogpublish to use correct cell type. Refs #8734.

Changeset: 2c5df459ff1f5e300ec36e93df97d525df0aa862

Last edited 7 years ago by Jay Rainey (previous) (diff)

comment:8 Changed 7 years ago by Jay Rainey

Last edited 7 years ago by Jay Rainey (previous) (diff)

comment:9 Changed 7 years ago by Jay Rainey

  • Summary changed from [ICAT] Use correct investigation ID to Use correct investigation ID in icat GUI

comment:10 Changed 7 years ago by Keith Brown

  • Status changed from verify to verifying
  • Tester set to Keith Brown

comment:11 Changed 7 years ago by Jay Rainey

  • Status changed from verifying to reopened
  • Resolution fixed deleted

comment:12 Changed 7 years ago by Jay Rainey

  • Priority changed from major to critical

comment:13 Changed 7 years ago by Jay Rainey

  • Status changed from reopened to inprogress

Use the investigation ID for searching. Not db table ID. Refs #8734.

Changeset: 57e2c36a8cff1e400ab735657e68ed28c22a2bbb

comment:14 Changed 7 years ago by Jay Rainey

Update catalog interface method signatures. Refs #8734.

  • Updated ICat4Catalog signatures and removed unnecessary cast.

Changeset: ce8417ad95bcd63624ea63850fb20a9d9adaa9ba

comment:15 Changed 7 years ago by Jay Rainey

Updated related investigation algorithms signatures. Refs #8734.

Changeset: 2993dfb4ba4788843a2142e1eb92ebfb08f59333

comment:16 Changed 7 years ago by Jay Rainey

Updated GUI methods calling related algorithms. Refs #8734.

Changeset: 1e98f0764a0f21f3536323e6cc38118405f81dd1

comment:17 Changed 7 years ago by Jay Rainey

Updated ICat3Catalog's method signatures. Refs #8734.

Changeset: 0382b2ecffd25ba9bd87d068865065bbe42eb680

comment:18 Changed 7 years ago by Jay Rainey

Update catalogpublish to use correct cell type. Refs #8734.

Changeset: 93ec37701424a2c68802bb8af42846c32a4807b1

comment:19 Changed 7 years ago by Jay Rainey

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

This ticket addresses the issue of using (and displaying) the incorrect investigation ID. I was instead using the database id for searching, which I changed in comment:1.

The correct investigation ID from ICAT can be a string as noted in comment:2. This meant that I had to change the method signatures in ICatalog.cpp and all classes that inherited this.

To test

  1. Open Mantid and set the "Log level" in the console to "Debug". (This way you can see the queries performed and verify that the investigation IDs output are now correct.)
  2. Log into the catalog.
  3. Click the "Search" option in the catalog menu. The search GUI will open.
  4. In the "Investigation name" field enter "long title".
  5. Select the "WISH" instrument.
  6. Click "Search" and related investigations will populate the "Search results" table.
  7. Double click on an investigation and observe the query being sent to ICAT. (Specifically: Investigation[name = as name is the investigation id.)
  8. Verify that the investigation ID used is correct. You can verify this against the ICAT web interface TOPCAT.
  9. Perform all different types of searches ensuring that the results returned are as expected.

comment:20 Changed 7 years ago by Peter Parker

  • Status changed from verify to verifying
  • Tester changed from Keith Brown to Peter Parker

comment:21 Changed 7 years ago by Peter Parker

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/8734_correct_icat_investigationid'

Full changeset: e95a1bdfff25c236f1c745be6fb0ac71da093fc9

comment:22 Changed 7 years ago by Peter Parker

Tested with investigation ID's that are strings as well as numbers.

comment:23 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9578

Note: See TracTickets for help on using tickets.