Use case
Fields like “Compliance Approval Timestamp” should only be updated as part of specific transitions (e.g., after passing a compliance review). These must not be editable by users, to satisfy audit and regulatory requirements. This is why you don't add them to editable screens.
To update fields which are not added to the edit screen these kind of operations need to be performed or run as the "Jira Workflow Toolbox app user" to ensure the fields are consistently updated.
If you want to automatically set other potentially editable fields check out our other examples like:
Set a date field to the current date
Set a date field to a future date
Add three days skipping weekends automatically to a Date Picker
⚒️ Configuration
Target issue*
Choose Current issue
Fields*
Select a Date Time Picker field or a Date Picker field. In our use case it's called Compliance Approval Timestamp
Expression*
Set the expression editor to General mode and enter the following expression:
%{dateTimeToString({system.currentDateTime} , "YYYY-MM-DDThh:mm:ss.sZ" , RUN_AS_LOCAL, RUN_AS_LANG)}
Alternatively, the expression editor can be set to Jira expression mode and the following expression can be used:
new Date()
Run as*
Choose Jira Workflow Toolbox app user .
Running this post functions as the dedicated Jira Workflow Toolbox app user ensures the correct execution of the field update - whether or not the field is present on the relevant edit screen.