owncloud / richdocuments

:notebook_with_decorative_cover: Collabora Online for ownCloud
118 stars 53 forks source link

Bugfix: broken version revision #522

Closed mrow4a closed 11 months ago

mrow4a commented 1 year ago

fixes: https://github.com/owncloud/richdocuments/issues/415 , https://github.com/owncloud/richdocuments/issues/222

I attempted to do it in such a way that it does not affect code complexity and performance of the "non-versioned" code paths. Thus performance is affected only when versions are listed or accessed

Screenshot 2023-09-27 at 15 58 30 Screenshot 2023-09-27 at 15 58 42
mrow4a commented 1 year ago

fyi @hodyroff @pako81 that the issue is addressed here. not sure which enterprise issue this is

jvillafanez commented 11 months ago

We might need to add some comment somewhere about the version "0". It seems counter-intuitive to me, because if the version 0 is the latest, then version 1 should be the second latest and version X the first version. If the version 0 is special to mark the current file, but the rest of versions follows the expected order (1 for the first, 2 for the second, and so on), we should document it somewhere to avoid confusion.

sonarcloud[bot] commented 11 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

0.0% 0.0% Coverage
9.6% 9.6% Duplication

mrow4a commented 11 months ago

@jvillafanez as requested, added a bit of clarification on why 0 is used. it is legacy of course. Because somehow in the past it was decided this column is not-null 😮‍💨