1
Updating Last Modified On Date in File Header
Question asked by Steve Bush - 4/24/2020 at 7:12 AM
Answered
The default file header template for a GhostDoc includes a Last Modified On: field that documents the date the file was last modified and by which author.  I would like this field to automatically update to the last modified date so it accurately reflects when the file was last modified.  

I reviewed the documentation and forum threads to understand how to automatically update this field.  Ideally, I could a command in the UI and command line which would automatically update this field at check-in or when I decide to generate a release.  

5 Replies

Reply to Thread
0
Misha Zhutov Replied
Employee Post
Hi Steve, 

The "Last Modified On" field is populated only when you click Document File Header button (or Document File) and it always inserts file last modification date:

Context.DestinationFileModificationDateTime.ToString("MM-dd-yyyy")

You can find it in the GhostDoc Pro->Options->Rules->File Header Template.
Is it not working for you?

0
Steve Bush Replied
Yes, using the Document File Header command works for me. This works for the initial documentation of the file.  Now, I make a change to the file and/or other files that have a Last Modified On field.  How do I update this field on all modified files that have an existing file header.  I would like to do this programmatically before check-in to my GitHub repository.

Thanks,

Steve
0
Misha Zhutov Replied
Employee Post
Thank you for the explanation. It is not possible now to do that in GhostDoc but we were thinking of updating the "Last Modified On" field on file/document saving (when clicking Save or Save All) - it will be optionally and turned off by default.
What do you think?
0
Steve Bush Replied
I think by adding the Last Modified On field to the file header, you need a mechanism to update it.  I would recommend an option to update the last modified field on save if the performance hit isn't too bad.  If performance is bad then I would want to do it in batch before I check in or do a release.
0
Misha Zhutov Replied
Employee Post Marked As Answer
Hi Steve, 

We added updating the "Last Modified On" field on Save click to our TODO list. We will get back to you when we implement that.

Reply to Thread