Page 1 of 1

Folder Time Stamp Not changing

PostPosted:Tue Apr 24, 2018 11:22 am
by praneeth
Hi,

I have a issue with Folder timestamp,it is not updated along the files under it, folder timestamps still shows folder created date,

I want folder stamp should be updated to latest date along with new file updated date under it

Thanks & Regards,
Praneeth

Re: Folder Time Stamp Not changing

PostPosted:Wed Apr 25, 2018 9:53 pm
by jllort
This is not the idea behind folder time. When you create a folder in the file system, the creation time does not change, always it showed the creation date, this is the same idea. Should be changed the source code for it, what I do not suggest. Consider any update into upper level, will cause in your logic a cascade of change until the root. Upload a file at /okm:root/test1/test2/test3 should raise a change at test3 folder, what will raise a change in test2 what will raise a change in folder1 ... this kind of logic is not much efficient.

On the other hand, the question is, what kind of problem are you trying to solve with it? Seems you are going in the direction to have two dates, creation and last update linked from folders. Seems when you change something in the box, you want to annotate when has happened. Take in consideration a change into the box is any change ( move, copy, etc... ), that's what I think this kind of feature has a poor performance behind.

Re: Folder Time Stamp Not changing

PostPosted:Wed May 23, 2018 3:27 pm
by praneeth
Exactly, I am looking for this as explained by you below
"Upload a file at /okm:root/test1/test2/test3 should raise a change at test3 folder, what will raise a change in test2 what will raise a change in folder1"

The issue i am facing is consider i have created a folder1 in Sep-2017 in this folder i have created document1 in Feb-2018 as per my knowledge i have created the document1 in Feb-2018, the real issue shows when other user logs in and lands on main page where the time stamp of the folder says Sep-2017 which mean the user will think that there is no update since Sep-2017

please suggest the solution for this, i am interested to know if i can compensate this issue with any alternate way

Re: Folder Time Stamp Not changing

PostPosted:Thu May 24, 2018 9:01 am
by jllort
Now we are working with creation date, not with the modified date as you propose. I think this kind of feature will cause a bad performance to the application - we have experience in something similar - and by default, we will not implement into OpenKM modified date.

I can explain to you how doing it with metadata and automation if you want this kind of feature. Or you can modify the existing source code but sure this feature will not be implemented by default.

I can list few reasons why we will not doing it:
1- implementation complexity ( for example move case )
2- in huge modification will cause bad performance ( in repositories with huge changes this kind of feature is not good, imagine scenarios with some millions docs and at the same time you are doing thousands of changes during a day, it will cause sure database overload )
3- what is considered a change ( creation, update or also modify metadata or security etc. ... DMS is something more complex than OS file system watching )

Re: Folder Time Stamp Not changing

PostPosted:Thu May 24, 2018 9:25 am
by praneeth
I totally agree with you with the below statement, in my case we have very minimal docs in the application some where around 100 - 150 and mostly one doc a day or some time it will be once in a week we updating one document or two documents.

by jllort ยป Thu May 24, 2018 2:31 pm
"I can explain to you how doing it with metadata and automation if you want this kind of feature. Or you can modify the existing source code but sure this feature will not be implemented by default."
- Please let me know the process.

Re: Folder Time Stamp Not changing

PostPosted:Fri May 25, 2018 4:25 pm
by jllort
I suggest one metadata group with a single field into folder ( okg:modified -> with field okp:modified.date )
https://docs.openkm.com/kcenter/view/ok ... adata.html
https://docs.openkm.com/kcenter/view/ok ... field.html ( input of type field )

https://docs.openkm.com/kcenter/view/ok ... ation.html
With automation events -> create folder, rename folder -> modify date and parent folders metadata until okm:root
With automation events -> create document, update, rename, move -> modify parent folders metadata until okm:root

Investigate how working some one of these automations, for example AddKeyword is a good candidate
https://docs.openkm.com/kcenter/view/ok ... ugins.html
https://github.com/openkm/document-mana ... yword.java

You need to evaluate parent folders and set metadata, might be interested in these classes:
https://docs.openkm.com/kcenter/view/ok ... #getParent ( parent folder of some path )
https://docs.openkm.com/kcenter/view/ok ... Properties ( folder properties )
https://docs.openkm.com/kcenter/view/ok ... tiesSimple ( get metadata )
https://docs.openkm.com/kcenter/view/ok ... ertySimple ( set metadata )