Forums

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

comparing 2 new custom field of type number

Admin April 9, 2019

Hi All,

I have a quick question and did not able to find my answer in quick research. Appreciated for any help.

I created new 2 custom fields of numeric type. I have previous issues that have no values "none" actually. We have some filled ones as well. When i made an advanced search by typing below JQL i got an error of "'Cost' for the 'Revenue' field is not a valid number."

"Revenue" is not EMPTY  and "Cost" is not EMPTY and "Revenue" > "Cost" ORDER BY created DESC

How i can resolve it? Is there an solution suggestion like isnull(Revenue)=0 or any other solution alternative without paying extra?

thx

 

1 answer

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.
April 11, 2019

Hello Mahmut,

Welcome to Atlassian community.

Unfortunately, JIRA does not have a JQL parameter to compare both fields values like you are needing. Numeric field values can only be compared against regular and pre-defined values, like 3, 4, 5, etc.

That been said, you can use a fixed value to compare both fields, like:

Revenue" > "3" and "Cost" < "3"

Although you mentioned that you are looking for a not paid solution, the only option that can give you the exact functionality you want is the plugin Scriptrunner with the Expression command mentioned on the documentation below in the Calculations section:

Expression function - Scripted JQL for Scriptrunner

Let me know if this information helps.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events