You can execute a Groovy script just after usual handling of worklog create and update and perform additional logic. When this script is running, work is already logged, so there is no way to stop logging work within this script. If you need to validate and stop logging work, you can use “Worklog Verification Script”.
Removing “Work logged” on a Child Issue from “Remaining Estimate” of Parent Epic
Some organizations prefer to define “Remaining Estimate” an “Original Estimate” required for a development in the parent epic. They log work to contained issues within the epic and these issues don’t have their own “Remaining Estimate” or “Original Estimate”. They want “time spent” for these contained issues to be deducted from “Remaining Estimate” of the parent epic. This script exactly does that. You may need additional logic for your own needs.
Setting the Account Specified with "Account Custom Field" to the Worklog Account In Case the Account Field of the Worklog is edited as 'None'
If there is an account value that is set with "Account Custom Field" to an issue, when creating the worklog to this issue, this value comes to the account field of worklog by default. Even if the account field is selected as None while creating the worklog to this issue, this value is set to worklog's account field. These are behaviours that are provided by WorklogPRO. Also with this script, Even if account value is changed to 'None' while editing the worklog, this value is still set to account field of worklog. In brief, If the account value is set for the issue with the "Account Custom Field", this account value is set to account field of worklog in the case that worklog's account field is set to 'None'.