Ticket #2 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

First version created in an existing record: version 2

Reported by: bruno Owned by: evert
Priority: major Milestone:
Component: Repository Version:
Keywords: Cc:

Description (last modified by bruno) (diff)

When creating a record with only non-versioned fields, and later updating it with a versioned field, the returned record object will return 2 for getVersion(). It also returns 2 when doing a fresh repository read (see testcase on #1).

I would expect this first version to have number 1. If not, it is impossible to know if this version was the first created version for the record, which I do need to know for the LinkIndexUpdater?.

When creating a record with versioned fields, the first real version is numbered 1 (which is good). When updating only non-versioned fields, no new versions are created either. It is only in the above scenario that some sort of fake version 1 is created.

Change History

comment:1 Changed 3 years ago by bruno

See the testcase in a comment on #1 for an illustration of the current behavior.

comment:2 Changed 3 years ago by bruno

  • Description modified (diff)

comment:3 Changed 3 years ago by bruno

  • Status changed from new to closed
  • Resolution set to fixed

(In [4074]) Fix #1: Creating a record with no versions returns 1 on Record.getVersion()
Fix #2: First version created in an existing record: version 2
In the records table, the current version column will be absent when there is no version.
Added test (from comment in #1), clarified Record.getVersion() javadoc, updated Indexer and its tests.

Note: See TracTickets for help on using tickets.