Review main Merged

68519[BUGFIX] Fix workspace pagination

Oli Bartsch CR +2 V +2 Normal +105 −13 updated 03/24/21, 17:00

Commit message

Since the workspace pagination took also child records
into account, which are however never being displayed
without their parent, the view broke as soon as such child
record would have been the first item on the next or the last
item on the previous page.

Therefore, the "total" count, used by the JavaScript pagination
to calculate the amount of pages, does not longer take any
child records into account.

The data array, containing the records for the requested page,
is now filled until the limit of records is reached with only parent
records. Therefore, the actual record items count can differ from
the proposed limit, since the child records are added without
increasing the corresponding counter.

The same functionality does also take place on calculation of the
offset value. This means, the offset provided by the pagination is
e.g. 30, but the backend side offset must be 30 + the amount of
child records in the previous 30 parent records.

Another special case is now also handled properly: When the last
record to be added is a parent record, having child records, they
need to be fetched recursively as well. Otherwise this would lead
to the same bug as before, since such record would then be the
first record on the next page, which does not work.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 1