Our organisation use Timetracker for log working time.
Timetracker use standart worklog and estimate time.
We have 2 type of users - new and old.
We have project with sick\leave task for every users. When they need vacation or sick they log time to this their tiket.
New user
In half year from their start have +5 Days for vacation\leave and + 0,5 year - add +10 Days. And every half year after their start they have +5 Days and year +10.
Maximum 15 days total.
Old user
1st january have +15 days for the year, and every year it refresh.
HR asked me to create system based on this tickets - show how much Days (vacation\leave) everybody have.
I created custom fields
Days - for calc days, how much it left
DaysOff - for calc how much days they Used
AddsCounter - is stop for add everyday Days (1 or 2)
Also for every User we add StartDate in tasks. For New its day of their start. For Old we set this date as 01.01.2021
DueDate - I use for check how much time spent, and i change it on {{duedate.plusyears(1)}} when it spent 1y and we add them +10 Days
1st script easy:

For correct Days no more than 15. If something not used and total stay >15.
2nd script add +5 Days (0,5y) +10 Days (1y) and I added - AddsCounter wich = 1 or 2. It sheduled on everyday at 9 am

1st part its for New users and Old(DueDate alwas 01.01.20XX)

It set UsedDays - 0 AddCounter - 0 and when DueDate > 1y than today it change it too.
This 2 scritps working, maybe I will optimise it.
I have issue with calc Days when guys Add, Del it or change.
3rd script
It correct Days and UsedDays when somebody changed worklog (Timetracker)
" {{Days}}-{{#issue.worklog.timeSpentSeconds.sum}}{{fromString}}-{{toString}}{{/issue.worklog.timeSpentSeconds.sum}})/28800
{{UsedDays}}+({{#issue.worklog.timeSpentSeconds.sum}}{{fromString}}-{{toString}}{{/issue.worklog.timeSpentSeconds.sum}})/28800 "

Need +Days when worklog minus
And +UsedDays when worklog plus
And edit to + or -.
Log show me
Could not convert the field value to a number. Please ensure the value is a number, math expression or smart-value that can be converted into a number.
UsedDays: 0.0+65220)/28800
Maybe somebody can help with script or Apps, that can solve this request with such system of add vacations\days-off