Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I ensure that the Worklog duration does not exceed the remaining time?

Muhammed Niyazi ALPAY February 3, 2023

Hello,

 

I want to block the description field from opening if the entered worklog time is more than the remaining time. Can you suggest a plugin where I can do this?

2 answers

0 votes
Wojciech Wardaszko
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 21, 2023

Hi @Muhammed Niyazi ALPAY

Welcome to the community.

Can you share your use-case? Worklog duration is used to report how much time something really took. If you limit it by your estimate, you lose the ability to assess how accurate your estimates are, so I'd recommend against it.

Having said that, I have no experience with the Scriptrunner so sadly I cannot guide you to the desired solution, but if you share more details perhaps I or someone else will be able to help you.

Cheers!

Muhammed Niyazi ALPAY February 21, 2023

for example: this issue have a 1 week time. when I enter 2w to time spent field I want to block the description field from opening.

worklog.png

if the employee has spent more than 1 week, he/she should request additional time from his/her manager. As far as I can see, the Scriptrunner plugin triggers the script when the event is completed.

Wojciech Wardaszko
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 21, 2023

Maybe you'd want to send the manager an email notification when that happens instead? This could be either an automated request for approval or just a heads-up that someone overlogged. 

This should be possible with Advanced compare block - you could do it like this:

Trigger: Work logged.

Advanced compare:
When:
{{issue.timetracking.timespent}}

greater than 

{{issue.timetracking.originalestimate}}

Action:

Send email.

It does not do what you ask, but may be useful in your scenario.

Cheers!

0 votes
Darin February 9, 2023

Hi @Muhammed Niyazi ALPAY please try Scriptrunner by Adaptavist.

You can write a behaviour in Groovy scripting language to achieve this in about 9 minutes.

Muhammed Niyazi ALPAY February 20, 2023

I'm trying this plugin, but it doesn't work for what I said.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events