I have a scripted field that return the duration (the time an issue has been in the current status). We need that in overview kanban boards and to be able to perform searches it needs to be a duration search.
.....
accumulatedTime += new Date().getTime() - currentStatusTime
return accumulatedTime/(1000) as long ?: 0L
.....
In the field it looks like: Days in status:21 weeks, 2 days, 18 hours, 47 minutes
I would like it to say how many days only. So in this case 149 days.
Have you tried configuring the template as Duration, instead of Duration (time-tracking)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're right. I couldn't get it to display as days either.
The template is a system default one, used also for other system configured fields.
You could try the other templates:
1-Text (not exactly searchable)
2-Number (my recommendation - the field name has to contain "Days" so it will justify the unit and the output would be an integer).
So if field name would be "Days in Current Status" an example output 149.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What I then need is for it to say Days afterwards. It is wanted in the boards for everyone to understand the number. It would work with number since it is comparing they want.
How would you do that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I get it.
Well you could try the text template adding number converted into days (let's say you have 8 hour days) and simply appending "days" after.
Though I have not experimented with searching abilities, since it's a text field and comparing operators should not work.
There is one more option, for custom templates. I haven't yet looked into it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well I kind of did that. Appending the days in the field which looks great in the board but searching is not really possible since it is a string. A number would be easier, but duration best :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for trying to resolve this! I will need to look into deeper how to do this.
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.