I have a scripted field where I'm returning a duration of time. I went with Xh Xd to keep with JQL's formatting. Is there a way to properliy sort this sort of duration? Number, Text, Date Picker Range aren't working. Any ideas?
I'm afraid the answer is "none of them". The problem here is that you're representing a number as a string. Because it's a string, you need a string type searcher, but that doesn't work for searching numerics
The "duration" stuff in JIRA's search and JQL works because it's storing a number in the background and interpreting it into a string for display - in the background, everything is done in numbers, but it talks to the humans in strings. There is code to do that number <> text translation.
The script runner does not have that functionality (yet. I seem to remember Jamie mentioned adding it sometime)
I think your best option might be to swap the field to be numeric, and represent hours. Then you'll be able to search and sort it properly.
Okay. It was using a double to represent days (ex: 1.11) with a number searcher. Guess I'll be sticking with that. Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.