Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can execute execute a Groovy script just before usual handling of timesheet submission/revoke and stop the submission process by returning an error message. Within this script you can access Jira services, WorklogPRO services and services from other plugins. You can use TimesheetApprovalRequest parameter to access values submitted by the user. Following script uses WorklogHelper service to get daily required work hours and daily actual work hours of the user for the timesheet period and checks the differences for totals. If user is submitted less than required work hours, it rejects timesheet submission.

...