In the version 2.3 you can activate the auto-change of page workstate on opening/closing pages.
The functionality is disabled by default.
Defining workstates to auto-change in EditorialConfig
Add to the EditorialConfig the following lines, replacing the ---- with the ID of the related page workstate for the statuses New, Edit and Layout.
<Item Name="glbAAPageWSNew" Value="----" />
<Item Name="glbAAPageWSEdit" Value="----" />
<Item Name="glbAAPageWSLayout" Value="----" />
Example:
<Item Name="glbAAPageWSNew" Value="116625" />
<Item Name="glbAAPageWSEdit" Value="3946" />
<Item Name="glbAAPageWSLayout" Value="15762" />
Note: the above IDs are related to a specific system and won't work on your system. Put the IDs related to the workstates on your system!
Enabling auto-action
On the Opening subtab of the Extra tab of the Page Editing Preferences, tick Apply Auto-actions When Saving page.
How it works?
The new script PageAutoActions is called from DataSave, DataClose, OnPageOpen and OnPageClose scripts.
When opening a page: if the workstate is New, it will be changed to Edit.
When saving a page: if the editorial layer of the page is not empty, the workstate is changed to Layout.
When closing a page: if the page is empty and the workstate is not New, it will be changed to New. If the page is not empty and the workstate was Edit, it is changed to Layout.
See also
Auto-closing of page on setting a workstate