Page 1 of 1

Document Versioning

PostPosted:Thu Jun 20, 2019 11:02 am
by samjenkins00
Hi All,

We have an existing tool for generating document numbers, which includes a version identifier eg. "ED-DRW-00099-01" where the 01 identifies the version/revision.

The full document number is used in the file name, and embedded within the documents in multiple places.

I've found the OpenKM config parameter to allow me to upload a new version with a different file name (due to the version identifier), but the OpenKM document name keeps the original.

A few questions based on this:
  1. If i keep this approach, should i implement an automation script to rename the file to reflect the new version? If so, is it possible to access the updated document filename?
  2. To save me having to manually select each document and upload a new version, is there a way to autodetect and auto update based on some criteria? eg. "ED-DRW-00099-01 - File Name 123.pdf" would be updated by "ED-DRW-00099-02 - File Name 123.pdf"

Re: Document Versioning

PostPosted:Fri Jun 28, 2019 1:26 pm
by samjenkins00
I'm assuming by the lack of replies that there isn't an easy answer to this, so I have another approach that i'm trying to accomplish.

We will upload new versions as new documents to the relevant taxonomy node, so in any given node we could end up with:
  • ED-DRW-00099-01 - File Name 123.pdf
  • ED-DRW-00099-02 - File Name 123.pdf
I then plan to run a script to search for documents of the same name (minus the version identifier), and apply the OpenKM versioning appropriately.

I've tried this via the REST API and i cant find a way to use an existing document as a new version, so i then tried just modifying the 'OKM_NODE_DOCUMENT_VERSION' SQL table directly. I'm pretty sure i modified the correct fields but i get an error when i view the files in taxonomy. So i'm guessing there is another reference somewhere in another table that needs updating.

Does anyone have any ideas?

Re: Document Versioning

PostPosted:Sat Jun 29, 2019 10:49 am
by jllort
You should create an automation based on document update -> and after the update ( post ) automatically rename the document. This is quite easy.
Take a look here https://docs.openkm.com/kcenter/view/ok ... ction.html

Also, I suggest use metadata, will help you to find a document quickly -> can fill metadata values based on the document name or set metadata after updating the document etc...
I do not remember if community version works with UUID, what is better than the path ( because of path changes ), you should test. I suggest always when possible working with node UUID either path. In the current professional edition, all go in this direction.