Import and change/override date

24 views
Skip to first unread message

bdil...@peachbush.com

unread,
Mar 30, 2017, 9:38:12 PM3/30/17
to Mayan EDMS
There's probably multiple questions here, but :-)

1) Looks like, despite some conversation about a new version of the bulk upload command line tool, such a critter doesn't exist... anybody done such a thing before I start poking at it?

2) Related, is there any way to "force" a created date? I would like to import some old documents, and having all the tools reference the date of import doesn't seem right. Maybe I'm doing this wrong.

Thanks!
Bruce

MacRobb Simpson

unread,
Apr 6, 2017, 3:52:20 PM4/6/17
to Mayan EDMS
Just something to throw out there - I, too, will want to do this.
I didn't find anything either, so my solution is to just manipulate the DB.
I'm using a MySQL backend for my production version, but the SQLite DB is similar enough for this to work.
You will simply need to update the date_added field on documents_document:

 UPDATE `(db)`.`documents_document` SET `date_added` = '(original date)' WHERE `documents_document`.`id` =(id num);

You can, of course, script this - either generate a table of ID-to-values and use a join, or simply generate a bunch of statements like that for each document to be updated.

Note that doing this won't change the Events section on the document, which may or may not be a good thing(it will show an event for document created on the actual upload date)

Bruce C. Dillahunty

unread,
Apr 6, 2017, 4:02:17 PM4/6/17
to mayan...@googlegroups.com
Makes sense... and probably the easiest way.

I kind of like having the even show the actual upload date (it is an event after all :-)), so that works out...

Appreciate it!


-- 
Bruce Dillahunty




--

---
You received this message because you are subscribed to a topic in the Google Groups "Mayan EDMS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mayan-edms/en9zXT2BAEE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mayan-edms+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages