Forums

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

Custom filter on ScriptedFiled number format) doesn't work

Olivier MAZEN
Contributor
November 29, 2018

Hello there,

 

I have defined a custom scripted field.

the formula is:

return ("date of creation" - "Date of taking into account")

 

So i have some negative value like -1, -27 etc..

 

When i want to make a custom filter to search all issues with my scripted field value equals to -1, all issues are return.

 

I have tried :

"script field" ~ -27

"script field" ~ "-27"

...

Nothing works.

 

Does it is possible to reach my needs? May i am missing something?

Unfortunatly google doesn't help me so far.

 

Thanks for your feedback

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
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.
November 29, 2018

What App is providing scripted fields?

Olivier MAZEN
Contributor
November 29, 2018

Hello Nic,

 

i used Add on Script Runner.

 

Sorry it was too obvious for me.

 

Olivier

Nic Brough -Adaptavist-
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.
November 29, 2018

Yes, there's a few that do scripted fields, and the response might be different for each App.

When you defined this field, did you tell Jira it was a number field, or something else (string etc)?

Olivier MAZEN
Contributor
November 29, 2018

Nic,

 

You question rang a bell !

 

i found out that i have to change the search template on my Script field.

 

Furthermore i havedefine the return value as an integer.

 

Works like a charm !

 

Olivier

Nic Brough -Adaptavist-
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.
November 29, 2018

Ahh, excellent.  I asked because the output templates determine the types of search.

A text field gives you a text search, but they're a bit rubbish on exact matching and fuzzy searches with numbers in my opinion.  While stuff like "~ flibble" or "~ pingu" will get you searches related to penguins, "~ number" often returns nothing, even when the number you give it is exact!

Number fields don't have fuzzy searches, but you can do =, <  and > with them, which I usually find more useful!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events