Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #9692 (closed)

Opened 12 years ago

Closed 12 years ago

Bug: Import metadata only

Reported by: jburel Owned by: jburel
Priority: blocker Milestone: OMERO-4.4.7
Component: Import Version: n.a.
Keywords: n.a. Cc: jamoore, cblackburn
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: n.a.

Description

The new import strategy does not take into account the specified target e.g. dataset.
The image is correctly imported but not linked to the dataset.

Change History (6)

comment:1 Changed 12 years ago by cblackburn

  • Remaining Time set to 0.5
  • Status changed from new to accepted

comment:2 Changed 12 years ago by cblackburn

  • Cc cblackburn added
  • Owner changed from cblackburn to jburel

I think this is a side-effect of the way you are now getting the ImportContainer. The following patch fixes the problem but there may be a better way of doing it

diff --git a/components/insight/SRC/org/openmicroscopy/shoola/env/data/OMEROGateway.java b/components/insight/SRC/org/openmicroscopy/shoola/env/data/OMEROGateway.java
index 1bc2fc1..384edd4 100644
--- a/components/insight/SRC/org/openmicroscopy/shoola/env/data/OMEROGateway.java
+++ b/components/insight/SRC/org/openmicroscopy/shoola/env/data/OMEROGateway.java
@@ -6403,6 +6403,7 @@ class OMEROGateway
                                        false, object.getPixelsSize(), null, usedFiles, null);
                        */
                        ImportContainer ic = c.getContainers().get(0);
+                       ic.setTarget(container);
                        ic.setUseMetadataFile(true);
                        if (object.isOverrideName()) {
                                int depth = object.getDepthForName();

Last edited 12 years ago by cblackburn (previous) (diff)

comment:3 Changed 12 years ago by jburel

This code should not have been there. This was there when I was comparing the method ImportCandidates? vs ImportContainer?. I will roll back instead of using the patch other problem metadata related will occur.

comment:4 Changed 12 years ago by jburel

I have done a quick test. The previous approach generates a NPE. Some testing required. This is a problem for people who have built their own importer

comment:5 Changed 12 years ago by cblackburn

I'm not sure what you are saying here. That the code in the last PR shouldn't have been there?

comment:6 Changed 12 years ago by jburel

  • Remaining Time changed from 0.5 to 0
  • Resolution set to fixed
  • Status changed from accepted to closed

No longer valid, the target was not set for the import context

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.66231 sec.)

We're Hiring!