Jira Automation: Track Previous Worklog Time

Paka
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 4, 2025

 

Hi everyone,

I’m trying to create a Jira Automation Rule that adjusts vacation days based on worklog updates, but I need a way to track the previously logged value to ensure correct vacation day calculations.

Requirements:

 If a user logs 4+ hours on a "Vacation" task, decrease vacation days by 1.

 If a user updates the worklog from 4+ hours to less than 4 hours, increase vacation days by 1 (undoing the previous decrease).

 If the worklog remains under 4 hours and is updated multiple times (e.g., 3 → 2 → 1 hours), it should be ignored (no additional vacation days should be added back).

 If a user logs 4+ hours and then updates it to 5, 6, 7, or more hours, it should NOT decrease vacation days again (only the first log of 4+ hours should trigger a decrease).

Question:

How can I reliably track the previous worklog time so that I can ensure the correct vacation day adjustments?

 

 

 

1 answer

0 votes
Vishal Biyani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 4, 2025

@Paka 

Required few clarifications to understand your use case better 

  • Is it ensured that only 1 user logs time against a unique Vacation issuetype?
  • if user X has to take 2 days timeoff, will they enter 16 hours total (Day 1 = 8 hours and Day 2 = 8 hours) or will user X create 2 Vacation tasks and enter 8 hours against each?
  • Where is Vacation days stored? is it on Vacation issuetype and what is the default value of Vacation days? if it goes negative, then what needs to be done?

 

NOTE: Work log time is rolled under Time Tracking (Time Spent/Time remaining). So instead of relying on individaul worklog entries, have you thought about checking the value of Time Tracking field (<=4 and >4 <=8)?

Paka
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 4, 2025

@Vishal Biyani 

1.Yes every user has its on vacation task

2. if user takes 2 days of he should log etleast 4> hours on  two days 

so if you want 2 days you log 4+ hours for each day you want in separate logs

3.I have two custom fields Vacation days that will be manually updated for each employee based of their vacation days and i have vacation days remaining that should increase or decrease based of automation logic i put in my question.

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events