Drafts
Drafts is a feature available for mobile applications which are not flagged to be online only.
Whenever a used does modifications on an edit page and leaves the page without saving (e.g. because there is no active network connection) he is asked to either save the pending changes as a draft on his device, to dicard the changes or to cancel navigation.
Create a draft drafts
Drafts are created whenever a save operation fails and a page is left with dirty changes e.g.:
When creating a new expense claim, the network connection drops after clicking the save button to save the expense:
There is no other way than accepting the error message (1) and go back to the previous page using the back button (2).
Since there are dirty changes not yet saved, the client will ask the user for one of the following options:
- Save as draft
Will save the current changes as a draft which can be opened and saved again later - Discard
Discard all modifications and go back to previous page - Cancel
Cancel navigation. This allows to stay on the same page and try to get a working connection again.
Drafts page
Existing drafts can be displayed by using the "My drafts" item in the burger menu and in the action panel.
The following items are available on the drafts page:
- and 2. Existing drafts (1. is selected by the user)
- Type of the draft
- Error when the draft was created
- Comment entered by the user
- Date when draft was created
- Endpoint the draft was created on
- Edit button to edit the content of the draft and save it
- Drop down to change selection in the list of drafts
- Drop down to change order of drafts
- Delete selected drafts
- Synchronize selected drafts
Editing drafts
There are three ways to continue the data entry process for a draft and finally save the data on the server and removing the draft:
Delete draft
Deleting a draft should only be done if the data entered in the draft is not valid or not required any more.
It will discard all data and remove the draft from the list.
To delete one or more drafts, select them in the list of drafts (1. and 2.) and use the delete button (11.)
Edit and save draft
This option allows to open a draft and check all data. Open the draft by using the edit button (8.)
Once validated, the draft can be saved using the save button. This will also remove the draft from the list of drafts.
Synchronize drafts
The third option is used when there are many drafts or the drafts should be saved on the server without validation user input. To synchronize one or more drafts, select them in the list of drafts (1. and 2.) and use the synchronize button (12.).
This will save all drafts in a batch. Note that some drafts could be rejected by the server. For these drafts, an error message will be shown next to the failed draft. These drafts can be edited and saved again manually or synchronized again.
All drafts that were synchronized successfully will be removed from the list of drafts