We do not support drafts currently. Occasionally, we have reports of users losing work due to internet or hardware glitches. Further, our translation system leads to entries that are not fully translated, unless the narrative is fully drafted in advance, outside of the interface. Build a new drafts feature that would allow users to save multiple drafts and return to them from any device. This larger project requires frontend design, database migration, API updates and frontend development work.
Functional Requirements
Support drafts on Case, Method and Organization.
Automatically save the drafts, as soon as the user leaves the field.
Display user's drafts as a list at the bottom of the Content Chooser page.
Display user's drafts as cards on a new tab called Drafts in the user profile page.
Do not translate the entry when it's a draft. Only perform the translation when the user publishes the entry.
Allow the user to continue to make changes to the drafts without validation.
UX/UI Requirements
MOCKUPS COMING SOON
Dev Checklist
[ ] Create a new column named draft in the table things, which is a boolean.
[ ] Add an onchange listener to all fields in the forms that call a saveDraft() method
[ ] The saveDraft() method creates the things and case|method|organization in the database, and mark draft as true.
[ ] If the entry exists in the database, the saveDraft() method updates the values.
[ ] This saveDraft() method should reuse existing code to save the data, but WITHOUT validation and translation. Both the translation and validation will happen when the user publishes the entry same as it does today.
[ ] When a user publishes the draft, change the draft to false and published to true. Make sure the post_date timestamp is updated to when they publish it and not when they save the first draft.
Testcases
The draft is saved automatically
The user can continue making edits on the draft multiple times.
The user writes a case in English. Save draft. When they publish, it should auto-translate the rest of the languages.
The user writes a title in English and French, but only English description. When they publish, it should auto-translate the rest of the languages for both fields.
The user selects the value for the field "General Type of Method" dropdown, but leaves the rest empty. This should save a draft.
We do not support drafts currently. Occasionally, we have reports of users losing work due to internet or hardware glitches. Further, our translation system leads to entries that are not fully translated, unless the narrative is fully drafted in advance, outside of the interface. Build a new drafts feature that would allow users to save multiple drafts and return to them from any device. This larger project requires frontend design, database migration, API updates and frontend development work.
Functional Requirements
Drafts
in the user profile page.UX/UI Requirements
Dev Checklist
draft
in the tablethings
, which is a boolean.onchange
listener to all fields in the forms that call asaveDraft()
methodsaveDraft()
method creates thethings
andcase
|method
|organization
in the database, and markdraft
astrue
.saveDraft()
method updates the values.saveDraft()
method should reuse existing code to save the data, but WITHOUT validation and translation. Both the translation and validation will happen when the user publishes the entry same as it does today.draft
tofalse
andpublished
totrue
. Make sure thepost_date
timestamp is updated to when they publish it and not when they save the first draft.Testcases