Opened 5 months ago

Closed 2 months ago

#2056 closed enhancement (fixed)

Improve API for project-specific annotations

Reported by: nicklas Owned by: nicklas
Priority: major Milestone: BASE 3.11
Component: core Version:
Keywords: Cc:

Description

When implementing #2049, we tried to keep most of the API as backwards compatible as possible with the previous BASE version.

We need to provide a more advanced API to make it possible to work with any annotation value without having to switch the currently active project globally. The exact requirements are not yet know, but at least the following is needed:

  • Create, modify, delete and query default values even when a project is active
  • Create, modify, delete and query project-specific values for other projects than the currently active project
  • More options in the batch annotation importer to control if it should work with default or project-specific values

Change History (7)

comment:1 Changed 4 months ago by nicklas

  • Owner changed from everyone to nicklas
  • Status changed from new to assigned

comment:2 Changed 4 months ago by nicklas

(In [7296]) References #2056: Improve API for project-specific annotations

Introduced methods on the AnnotationSet class that can be used to create/read/query/delete project-specific or default annotation values no matter what the currently active project is.

The test class has been extended with additional test cases.

comment:3 Changed 4 months ago by nicklas

(In [7297]) References #2056: Improve API for project-specific annotations

Added support in the SnapshotManager class to force loading default of project-specific annotation values ignoring the currently active project.

comment:4 Changed 4 months ago by nicklas

(In [7298]) References #2056: Improve API for project-specific annotations

The AnnotationBatcher should now have support for setting a specific project to work with. A single batcher may only work with one project (or with default values) during it's lifetime. It is not possible to switch strategy between items or annotation types.

comment:5 Changed 4 months ago by nicklas

(In [7299]) References #2056: Improve API for project-specific annotations

Changed API methods related to this to take a Project parameter instead of the numeric ID. This is to avoid permission issues that would make it possible to create annotations for projects that the logged in user is not a member of.

comment:6 Changed 3 months ago by nicklas

(In [7318]) References #2056: Improve API for project-specific annotations

Added method for checking if annotation values are different from those that are already stored in the database.

comment:7 Changed 2 months ago by nicklas

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.