Workflow Condition: How to set condition for field Original Estimate

Max Benek June 8, 2020

I would like to set a condition for the filed Original Estimate to check, if the value of the field is less than 4h.

Example:

The field Original Estimate will have to be less than value '4h'. Compared as String.

Question:

Which "Comparison Type" do I need to use?

  • String
  • Number
  • Date
  • Date without time
  • Option ID

Also how do I have to set the value?

  • 4
  • 4h

I've tried multiple condition combination, without success.

3 answers

1 accepted

0 votes
Answer accepted
Petter Gonçalves
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 9, 2020

Hello @Max Benek

Thank you for reaching out.

Indeed, Jira does not have a comparison type to calculate the number of days or hours added to a field. We have a feature request to allow that kind of comparison in workflow conditions:

As an admin, I'd like to set a date comparison condition in the workflow as a JQL search

Feel free to vote and watch the suggestion to increase its priority and also receive notifications about any updates.

A possible workaround would be to use the Automation for Jira to send a message and keep the issue in the same status if the original estimate is not less than 4 hours, preventing the issue to proceed in the workflow. These would be the steps:

  1. Create a transition in your workflow back to the previous status where the original estimate should be configured with less than 4 days, configuring a condition to only allow the automation for Jira user to execute it
  2. Under Project settings > Automation, configure the following rule, moving the issue to the same status it was if the original estimate is not less than 4 hours and optionally adding an e-mail message or comment to warn the assignee on why the issue did not proceed in the workflow:
    Screen Shot 2020-06-09 at 18.14.37.png

Let us know if you have any questions.

Rob Horan
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.
March 30, 2022
0 votes
Floating electron
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.
March 28, 2024

Original Estimate field is stored as a number of seconds. Therefore in your case 4h = 4x60x60 = 14400

If you only need a condition, then you can use Value Field condition configured as: 
Value: 14400

Comparison Type: Number

If you require a validator, consider using a Jira expression-based validator. There are several options available on the marketplace.

We've developed the Jira Expression Validator as part of the free  Workflow Building Blocks for Jira  app. Feel free to give it a try! The Jira expression for your case will be:

 

issue.originalEstimate < 14400

 

0 votes
Max Benek June 10, 2020

Hello @Petter Gonçalves ,

Thank you very much for your fast answer!

Your suggestion was successfully.

Suggest an answer

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

Atlassian Community Events