Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Versioning #341

Open
cflinspach opened this issue Jun 24, 2013 · 3 comments
Open

Versioning #341

cflinspach opened this issue Jun 24, 2013 · 3 comments

Comments

@cflinspach
Copy link

I added

date = DateToString(DateTime())
db = plominoDocument.getParentDatabase()
user_name = userFullname(db, db.getCurrentMember())
plominoDocument.setItem(
'history',
plominoDocument.getItem('history') +
"This document has been modified by "+user_name+" on "+date)

to onSaveDocument but I just get a line pictured below when a document is changed.
image

I read the comments on http://sourceforge.net/p/plomino/discussion/538558/thread/41f22e29

and was wondering if there's document versioning?

@ebrehault
Copy link
Member

Plone provides a history for any content, and it is stored in tool (portal_historystorage).
You cannot update this history storage just be creating a plomino field named "history", it will not be binded (Plone cannot guess it should be).
So you have 2 options:

  • either you store your history into your Plomino history field and you implement a mechanism to display it instead of the Plone history (probably quite easy with Diazo)
  • either you use the Plone API to update the actual Plone history from your Plomino formula

@cflinspach
Copy link
Author

I used the example on https://plomino.readthedocs.org/en/latest/features/ is there a how to for updating the Plone history via the API?

@ebrehault
Copy link
Member

I do not think so, you will have to read the code to find out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants