Business hours and days using ScriptRunner

Jayanth
Contributor
February 24, 2025

I want to calculate business hours and days using ScriptRunner in Cloud. Is that possible and If yes how to do that?

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 27, 2025

Hi Jayath,

I can confirm that ScriptRunner for Jira Cloud runs Groovy as its scripting engine, which means it can run any standard Groovy or Java packages provided by default, as well as the extra packages we provide which are documented here.

This means you can use the standard date/ time APIs to calculate the number of days and hours between two dates.

There is an example script located here which shows how to calculate the number of days between two dates that could be modified to achieve this requirement.

I would advise trying to modify this and if you need further assistance on this raising a support ticket here, so that our support team can assist with this.

Regards,

Kristian

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events