openkm / document-management-system

OpenKM is a Open Source Document Management System
https://www.openkm.com/
GNU General Public License v2.0
671 stars 297 forks source link

CmisRepository version label wrongly returns filename instead of actualVersion #320

Closed rohitmp closed 1 year ago

rohitmp commented 2 years ago

Current behavior: The CmisRepository for a document node return the node path name. ( e.g my_resume.pdf ) Expected it should return the version number 1.2 or 4.0 etc.

Rootcause/fix

the bug lies in CmisRepository.java where the node pathName is being set addPropertyString(result, typeId, filter, PropertyIds.VERSION_LABEL, PathUtils.getName(node.getPath()));

where as it should have been addPropertyString(result, typeId, filter, PropertyIds.VERSION_LABEL, doc.getActualVersion().getName());

darkman97i commented 2 years ago

@gnujavasergio Take in consideration only the documents have version, in the case of folders etc.. .should always set 1.0 by default