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,560,304
Community Members
 
Community Events
185
Community Groups

How to query duration searcher field?

Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 20, 2020

I'v got a scripted field using ScriptRunner. The script outputs a Long value with ScripRunner useing the Duration template.

The custom field also uses the Duration searcher.

The values in the issues are fine. But querying them with JQL does not work as excpected.

Example:

The field shows this value on an issue: 1 day, 11 hours, 5 minutes

When I search for: myField < 2d the issue is not in the results.

Is it possible to use a duration field in JQL? Or should I use a date field instead?

 

2 answers

0 votes
Ilya Stekolnikov
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.
May 25, 2022

i Have same issue. Did you solve it somehow?

Charlie Misonne
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 25, 2022

Hi @Ilya Stekolnikov 

This more than 2 years ago but I don't tink I found a solution in the end.

Feel free to create a new question for this on the Community.

Ilya Stekolnikov
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.
May 25, 2022

I found an open issue at Adaptavista Jira. So they didin't fix it yet.

Like Charlie Misonne likes this
Charlie Misonne
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 27, 2022

Are you able to share the link to the issue? Could be useful for anyone else stumbling upon this post :-)

Ilya Stekolnikov
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.
May 29, 2022

@Charlie Misonne I'm currently having the same issues. Did you figure it out :)?

Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 28, 2020

Hello

No I didn't. I chose to use a date field instead.
I don't think we can query duration field but I'm not 100% sure. If you really need it try asking via a vendor support ticket.

Thank you for the answer :)

It kind of sucks that the official documentation shows examples that do not work.

I'm curious too. I'm trying to use the scripted field for "Total time this issue has been In Progress". Are you able to export the data to a CSV containing the custom "Duration" field? 

Thanks
Dawn




Also, I see this note on the scriptrunner docs page. "Use the Duration Searcher. For the template choose Duration." Any idea what this means? 

Did you also assign a search term to the field? I found this in their docs.  

(Optional) Enter a Search Term if you want to use Scripted Fields when searching for issues with JQL. There are several conditions that must be met for Search Terms, including: they must be unique, case sensitive, and contain no whitespace. Existing search terms/Jira custom field names cannot be used.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.12.3
TAGS
AUG Leaders

Atlassian Community Events