Page 1 of 1

Bug report: major / minor options are swapped

PostPosted:Thu Jul 15, 2021 3:36 am
by ryanm
Hi,

We're running OpenKM CE 6.3.9 in Docker (openkm/openkm-ce:6.3.9) with version.numeration.adapter= com.openkm.vernum.MajorMinorReleaseVersionNumerationAdapter

When we update documents and check the "Increment minor version" box, the major version is incremented. And vice versa.

I think I've found the issue in the source:

In src/main/java/com/openkm/vernum/MajorMinorReleaseVersionNumerationAdapter.java
Code: Select all
public static final int MINOR = 1;
public static final int MAJOR = 2;
This is reversed compared with src/main/java/com/openkm/frontend/client/widget/upload/FancyFileUpload.java ...
Code: Select all
if (increaseMajorVersion.getValue()) {
	uploadForm.setIncreaseVersion(1);
} else if (increaseMinorVersion.getValue()) {
	uploadForm.setIncreaseVersion(2);
} else {
	uploadForm.setIncreaseVersion(0);
}
... and src/main/java/com/openkm/extension/frontend/client/widget/htmleditor/CheckinPopup.java
Code: Select all
int increaseVersion = 0;
if (increaseMajorVersion.getValue()) {
	increaseVersion = 1;
} else if (increaseMinorVersion.getValue()) {
	increaseVersion = 2;
}
Thanks,
Ryan

Re: Bug report: major / minor options are swapped

PostPosted:Fri Jul 16, 2021 4:10 pm
by pavila
Last release is v6.3.11, please verify if this is already fixed.

Best regards.

Re: Bug report: major / minor options are swapped

PostPosted:Mon Jul 19, 2021 1:07 am
by ryanm
Hi,

We are still experiencing this issue after upgrading to 6.3.11.

Thanks,
Ryan

Re: Bug report: major / minor options are swapped

PostPosted:Mon Jul 19, 2021 7:58 am
by pavila
Please, create an issue at https://github.com/openkm/document-management-system and would be nice if you can create create a pull request with the fix.

Thanks.