Keep Revision History of Documents

Scott on 11/5/2015 9:35 PM

Scott on 4/1/2016 3:33 AM


0 (hrs)


We need to allow the user to upload an update to a document.  So when they download the document, they might make some changes, they need to upload it back to the server.

  1. Go to League > Documents
  2. Upload a document.
  3. Click on the documents, Comment Icon.
  4. Create a new upload control.
    1. Call the control: "Upload and Replace Document"
    2. With italics and muted text: "This will replace the current document."
  5. On file browser open, the user can only select a file extension with the same file extension as the current document.
  6. Upon uploading, the new document will be saved in a new location.
  7. Add a new property to the LeagueDocument DB table.
    1. Documents which is a List<Document>
    2. The old LeagueDocument.Document shall be added to the list of of documents.
    3. The new document shall replace the LeagueDocument.Document.
    4. Then delete the old document from the server and set the flag IsDeleted on Document.
    5. Then Save.
  8. Upon viewing the comments page again, it shall contain a running history of the old documents with the following columns.
    1. Move the history under the comments section.
    2. Document Name
    3. Document Size
    4. Document Created
    5. Document Removed



Hmmm...I don't think we want to keep old documents. We're trying to streamline our processes, not bury them in archives of useless oblivion. :D


Our old forum allowed us to attach a (for example) .pdf of our sponsorship packet (into a thread, not an option at this time in RDN, I know), then go in and "edit" and upload a revised version of that form as certain levels of sponsorship became sold out. Basically, when a member goes to that document, it would always be the most recent version. It also kept a date/time stamp as to when it was last "edited", which was a nice feature.


need revision history of documents.

Skip Navigation Links

Scott Saturday, February 20, 2016 7:11 PM #

Just remove the inline styles and everything else looks good.



Scott Thursday, February 18, 2016 7:26 PM #

Add a new MemberReference to RDN_Documents to the person who uploaded the document.  I think this makes sense.  Then you can have a history of who uploaded the documents.


Icatalin Wednesday, February 17, 2016 4:39 PM #

I think you have understood me wrong ( or I did not understood 3.1) Lets assume we have a file which now is on version 3 ( v3.txt)

in RDN_Documents we have v1.txt v2.txt and now the current version v3.txt is in RDN_League_Documents which lets say it has uploaded by user3

So now if user 4 wants to upload a new version v4.txt I know that last version was (v3.txt uploaded by user3, but i don't know who uploaded the v1.txt adn v2.txt) and also when 

user 4 will upload v4.txt  v3.txt will be put in RDN_Documents and the info that user3 has uploaded v3.txt will be lost.

Basically I know only who uploaded the currect version of the file.


Scott Wednesday, February 17, 2016 2:49 AM #

Don't worry about old documents.  If nothing is there, then don't worry about showing it.


Icatalin Tuesday, February 16, 2016 12:50 AM #

At point 3.1 I have a problem , the user that upload a file is saved in LeagueDocument , so because of this I know which user has uploaded the last version but I don't know which user uploaded the older versions. ( I would need that info saved in RDN_Documents ( I think) 


Scott Friday, February 12, 2016 7:54 PM #

Looks good.

  1. Please Bold the titles: Upload and Replace
    1. Tags
    2. Comment
    3. History
  2. Please remove the bold font from the rows in the history table.
  3. Add one more column to the history table.
    1. The person who uploaded the new document.

Scott Thursday, February 04, 2016 1:28 AM #

  1. Put an Obsolete on top of RDN_League_Documents.Name.
  2. Add a column to RDN_Documents.Name
  3. Moving forward, update all the methods that save the name in the Obsolete column, to the new Name column.
  4. Moving forward, when getting a document, try grabbing the name from RDN_Documents.Name, and if the string is null or empty, then grab the name from the Obsolete column.
  5. Create a method in the document manager called DoUpdate
    1. Copy all the names from RDN_League_Documents.Name to the RDN_Documents.Name
      1. Only copy the names.  Don't MOVE the name.  Keep the same name in both columns for now.
        1. In the future it can be deleted.
    2. Add this method to RDN.Raspberry.TaskController.DoUpgrade method.



Icatalin Wednesday, February 03, 2016 11:11 PM #

This is almost done, I have commited what I have done so far https://bitbucket.org/rdnation/rdnation/pull-requests/67/rdn-1294-keep-revision-history-of/diff

But I have a problem at 8.2

Table RDN_Documents doesn't contain a column Name, only RDN_League_Documents have a column Name but the row from RDN_League_Documents will be updated with the current information ( of the new file), In other words the Name of the file is lost when I delete the old file. If you have time take a look on the code and let me know what should I do, maybe I have done something wrong. Thanks!

Powered by BugNET 1.6.339.0