Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Custom Filter sort with conditional logic

This relates to Jira Service Desk.

I have a custom filter which is sorting by descending priority placing my highest at the top.  However if an item has a due date I want that to be first if its the same date as today - so i want to do something like this:

order by iif(duedate = today(), 99, priority) desc

 So the theory is that if its got a due date it will naturally be first, otherwise it would use priority order.  Does anybody know how to get something like this working?

Thanks

2 answers

0 votes

Hello @Dom Cotton 

This is an Else if statement and there is no equivalent for this in JQL.

The same thing is discussed here 

https://community.atlassian.com/t5/Jira-questions/How-to-Use-Conditional-Statements-in-Search-Filter/qaq-p/851838

Answer provided by Atlassian 

Natively, Jira can't do this kind of conditional searching in JQL.   It might be possible for you to use something like the SQL for Jira Driver: Convert JQL to SQL to help here.  This plugin lets you use more SQL like syntax when querying Jira.   

What I would do is add a custom filed type Select list, for example, I'll name it  "Priority Rank".

Then use automation to check due date, and if the due date is today set "Priority Rank"

Also, I would add automation to edit "Priority Rank" based on issue priority when created.

Of curse, you would need Automation for Jira plugin to achieve this.

OR 

Add two gadgets with filter results to your dashboard one to represent due day issues and other issues ordered by priority. 

No plugin no, done in a few minutes.

BR, Olga

Sort by Due Date, then Priority Order is probably your best bet.

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you