Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,559,412
Community Members
 
Community Events
184
Community Groups

Include a simple operation in the JQL

Hi,

I am trying to create a filter that would display issues that would follow a certain operation constraint:

remainingEstimate+timespent>originalEstimate

Would anyone know how I could achieve that?

Thanks in advance!

 

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 01, 2023

Hello @Pierre Leroux 

Native JQL does not support comparing one field to another, nor executing math operations within the JQL statement.

What do you want to do with the output of the filter?

If you want to use only native Jira functionality and be able to create a filter with JQL to retrieve the issues, then one way you could solve the problem is by creating a custom field that could be used to keep track of the condition having been met or not met. You would then also create Automation Rules to populate the field.

If you are interested in that solution, let us know and we can provide more details.

You might also be able to find a third party app in the Atlassian Marketplace that would add some functionality that would enable you to get what you want. I have not tried to solve this type of problem with a third party app, so I don't have any specific recommendations. You might be able to achieve it with one of the apps that provides Calculated Fields.

Thanks for this useful answer.

To your question "What do you want to do with the output of the filter?", I would say we want to build a dashboard that show the tasks that have a fair chance to exceed the original estimate in terms of time spent. Before a task is completed, if the remaining estimate in addition to the time already spent on a jira exceeds the original estimates, there is a very high chance this task will cost more than expected. We want to locate those tasks in real time, in order to act ASAP by helping the person in charge achieve their goal in time and budget.

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 02, 2023

By adding a custom field that you populate with an Automation Rule, you would be able to build a filter based on that custom field and use that filter with several of the natively available dashboard gadgets.

With the Automation Rule, you would be updating the issue in real time by creating one or more rules that would detect changes to the Remaining Estimate, Time Spent and Original Estimate fields.

Based on the answer on this post you could create a rule that detects a change to the Original Estimate field.

And you could create another rule that uses the Work Logged trigger to detect a change to Remaining Estimate and Time Spent.

Time Spent and Remaining Estimate for an issue can be accessed using the {{issue.timetracking}} smart value.

You could use an Advanced Compare Condition to compare the sum of the two fields to the value of the Original Estimate field.

You can use the Log action to print out field and smart values to the Audit Log for the rule to double check the values. Note that the values for these fields may be stored as seconds in the database which is why you might want to print them in the Audit Log to double check the actual values that are used in the Automation Rule.

And finally, you would use an Edit action to update your custom field.

Suggest an answer

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

Atlassian Community Events