Forums

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

sorting custom date fields

Mazin Alton February 16, 2021

HI I am using NextGen tickets i have added a datetime field, but it seems like that i cannot sort by the field in the filter view.

i have tried both advanced or basic filter sorting, no matter what i do it does not sort by date.

 

my custom field is set to be used to display production dates, but i cannot sort to see all the newest dates at first.

 

it works if i sort by due date, but not this custom field.

 

the field is not text field it is a datetime field.

1 answer

0 votes
Brant Schroeder
Community Champion
February 16, 2021

@Mazin Alton 

Does your custom field have a search template associated with it?

Mazin Alton February 17, 2021

not sure where you can set that?

Mazin Alton February 17, 2021

here is code 

issuetype = "Project Info" ORDER BY cf[10092] ASC

 

and image of the date field

Capture.PNG

Brant Schroeder
Community Champion
February 17, 2021

@Mazin Alton In order to look at the custom fields settings you will need to go to the Jira settings in the upper right hand corner (it is a cog / gear) and click it.  In the drop down select issues.  Then from the left hand side select custom fields.  Search for your custom field.  When you see it in the list on the right hand side there will be three dots, click the dots and select edit details.  On this page you will see the search template, what is it set to?

Mazin Alton February 17, 2021

okay, i am making an assumption that because this is a next-gen project i cannot find the custom field in the area you mentioned above. 

Mazin Alton February 17, 2021

i can see all other non net-gen fields but not this particular one.

Brant Schroeder
Community Champion
February 17, 2021

@Mazin Alton 

I am not able to recreate the issue on my instance. Does it give you any type of error when you run the filter search?

Mazin Alton February 17, 2021

no errors, it just does not filter shows a few in order and the rest not in order let me show you a screenshot.

222.PNG

Brant Schroeder
Community Champion
February 17, 2021

The screenshot looks like it is allowing sorting but the sorting just is not happening.  How long has the custom field been in place?  Also when is the last time you cleared your browser cache?

Mazin Alton February 18, 2021

i noticed this too... looks like for the same custom field there is a different ID... now this would make sense but why is it like that? 3333.PNG

Mazin Alton February 18, 2021

i tried this issuetype = "Project Info" ORDER BY "LIVE DATE" DESC

 

no go still

Brant Schroeder
Community Champion
February 18, 2021

Mazin,

  Looks like you have tons of live date fields. Can you just run your query without the order by and then sort on row?  Does that work?  Also when did you create the field?

Mazin Alton February 18, 2021

still doesnt work... a few weeks ago field was created... and i dont think there is a way to use same field id across other projects

Brant Schroeder
Community Champion
February 18, 2021

Can you search by project and only have that as the search criteria then do the order by clicking on the column heading, does that work?

Mazin Alton February 18, 2021

i bet that would work let me try.

Mazin Alton February 18, 2021

nope no go.. i have two results, and when i click on the column to sort the date does not move

 

project = "2021 General Tours" AND issuetype = "Project Info" ORDER BY cf[10092] DESC

Brant Schroeder
Community Champion
February 18, 2021

I am at a loss and not being able to see your instance does not help.  Atlassian support will be able to see everything and I would suggest submitting a support ticket with them.  https://support.atlassian.com/contact/

Mazin Alton February 18, 2021

that makes both of us, yesi created a ticket waiting for their reply.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events