Task #9692 (closed)
Opened 7 years ago
Closed 7 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 7 years ago by cblackburn
- Remaining Time set to 0.5
- Status changed from new to accepted
comment:2 Changed 7 years ago by cblackburn
- Cc cblackburn added
- Owner changed from cblackburn to jburel
comment:3 Changed 7 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 7 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 7 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 7 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
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();