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 #4341 (closed)

Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

DOC: Delete annotation with delete object

Reported by: jburel Owned by: jamoore
Priority: minor Milestone: OMERO-4.4
Component: General Version: n.a.
Keywords: n.a. Cc: jburel, jamoore, cxallan
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2012-01-17 (6)

Description

Deleting annotation using the deleteObject method from {{{IUpdate}} fails.

Change History (16)

comment:1 Changed 10 years ago by jmoore

  • Milestone changed from Unscheduled to OMERO-Beta4.4
  • Owner set to jburel
  • Sprint set to 2012-01-17 (6)

Jean-Marie: do you remember about what was happening here? Was the annotation attached to something else and therefore the link kept it alive? If so, I suggest we close this and just deprecate IUpdate.deleteObject (which we want to do anyway).

Note: pushing this passing test to my branch:

+class TestTickets5000(lib.ITest):
+
+    def test4341(self):
+        """
+        Delete annotation with IUpdate
+        """
+        tag = omero.model.TagAnnotationI()
+        tag = self.update.saveAndReturnObject(tag)
+        self.update.deleteObject(tag)
+

comment:2 Changed 10 years ago by jburel

I will review the tests I had.

comment:3 Changed 10 years ago by jburel

  • Remaining Time set to 0.25

comment:4 Changed 10 years ago by jburel

  • Status changed from new to accepted

comment:5 Changed 10 years ago by jburel

deleteObject can be useful if we want to just break links. The ones we need to deprecate first are IDelete.deleteImage, IDelete.deletePlate

comment:6 Changed 10 years ago by jburel

The problem was related to the deletion of file annotation and original file. The test is in UpdateServiceTest.

@Test(enabled = false, groups = {"ticket:2705"})
public void testDeleteAnnotation() 

comment:7 Changed 10 years ago by jburel

  • Owner jburel deleted
  • Status changed from accepted to new

comment:8 Changed 10 years ago by jburel

  • Owner set to jburel

see #7774

comment:9 Changed 10 years ago by jburel

  • Status changed from new to accepted

comment:10 Changed 10 years ago by jburel

  • Cc jburel added
  • Owner changed from jburel to jmoore

The delete method from {{{IUpdate}} "fails" when trying to delete a file annotation. The file annotation is deleted but the original file is not.
The original file should be deleted.
See deleteAnnotation in components/tools/OmeroJava/UpdateServiceTest

Passing back to Josh for consideration, if we mark the method has deprecated that's fine.

comment:11 Changed 10 years ago by jmoore

  • Cc cxallan added

That's certainly the expected behavior for IUpdate.deleteObject: only remove a single row from the database. I'm not sure we want to get into modifying the logic of IUpdate, and would prefer to just deprecate it. Should I do that as part of this ticket, or hold off for a larger round of deprecation?

comment:12 Changed 10 years ago by jburel

I will probably hold off. If it is not deprecated we need to indicate not to use that it i.e. a documentation ticket

comment:13 Changed 10 years ago by jmoore

  • Summary changed from Bug: Delete annotation with delete object to DOC: Delete annotation with delete object

In discussion with Jean-Marie, adding to IUpdate.deleteObject documentation the limitations of this method (one row at a time) and pointing them to the new delete service.

comment:14 Changed 10 years ago by jmoore

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

Pushing minor documentation fix to sprint6-server-backlog. We still need to merge the javadocs from ome.api with those from omero.api (#2101).

comment:15 Changed 10 years ago by jmoore <josh@…>

(In [a7c9f6ee9623b949b3f72a039a016dc47b985803/ome.git] on branch develop) Passing IUpdate delete test (See #4341)

comment:16 Changed 10 years ago by jmoore <josh@…>

(In [a4905400b00d468fb9d177d48e2e9af116aaf15f/ome.git] on branch develop) IUpdate.deleteObject doc update (Fix #4341)

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.73742 sec.)

We're Hiring!