When I have multiple sla, how to order issue by sla in a Kanban view (jira agile) of a service desk project ?

I see that i can make a filter but i can'tmake a filter by column. So i need to have a filter how use sla using all I want to do something like this :

project = Support

if status = "En attente dune assistance" AND resolution = Unresolved ORDER BY "Temps écoulé pour la première réponse"

if status= "En attente dun tri" AND resolution = Unresolved ORDER BY "Temps écoulé pour obtenir de l'assistance"

If I use a case :

order by CASE sla(ocfv.content,'')

WHEN 'En attente dune assistance' THEN "Temps écoulé pour la première réponse"

WHEN 'En attente dun tri"' THEN "Temps écoulé pour obtenir de l'assistance"

ELSE "Temps écoulé pour obtenir de l'assistance"

END DESC

Can someone help me with that ? I just want to see the service desk in a kanban view order by SLAs.

1 answer

The sorting/order applies to the entire board. If you update the board's filter, then each individual column will be sorted by that order as well. There is not any means to sort individual columns. https://confluence.atlassian.com/display/AGILE/Configuring+Filters

The SLA's are just additional fields on each ticket so you can use the standard JQL to order on them individually.

ORDER BY "Time waiting for support"

But the logic of how to order on field A sometimes and B other times within the same query is much trickier (and certainly a corner use case). But heres the advice from my comment below based on Tommy's feedback:

The idea is to encapsualte your logic into the field, rather then JQL.

Use the JIRA Script RUnner plugin and add the custom field. Write Java or Groovy to look at the status and resolution, and set the feild to SLA A, or SLA B. Jamie has lots of great example scripts bundled with the plugin, and also in the public wikispace for the project.

You would then ORDER BY that new custom field, and it would use the appropriate time for each issue.

If you want to go a step further you can write your own custom field (not field type) and have it calculate the value using any logic you wish. That single field can then be used for searching. https://developer.atlassian.com/display/JIRADEV/Custom+Fields+in+JIRA

Hi Eddie, i know that i'm not able to sort individual columns but did you know if i'm able to create a JQL filter who will sort correctly with this limitation.

Sorry @Tommy.

if i'm able to create a JQL filter who will sort correctly with this limitation.

The limitation being an sort on field A sometimes, but sort on B others?

I am not aware of JQL's ability to support that in general (throwing Service Desk aside for the moment). In general its a twist in paradigm to say for ISSUE-1 Field A is used to order on the same board that ISSUE-2 is sorted just above it based on FIeld B. But I think in the context of SLA I can see where you are going.

(if I still am missing what you're asking please let me know! :) )

But I can think of a customization that _i think_ is what you are trying to accomplish. But would involve a scripted custom field. The idea is to encapsualte your logic into the field, rather then JQL.

Use the JIRA Script RUnner plugin and add the custom field. Write Java or Groovy to look at the status and resolution, and set the feild to SLA A, or SLA B. Jamie has lots of great example scripts bundled with the plugin, and also in the public wikispace for the project.

You would then ORDER BY that new custom field, and it would use the appropriate time for each issue.

If you want to go a step further you can write your own custom field (not field type) and have it calculate the value using any logic you wish. That single field can then be used for searching. https://developer.atlassian.com/display/JIRADEV/Custom+Fields+in+JIRA

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

157 views 1 17
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you