Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Page properties
hiddentrue


Status
Tech review

Status
colourGreen
title

todo

done

Style guide

Status
colourGreen
title

todo

done

Page status

Status
colourGreen
titlecomplete

Status
titletodo
Status
colourYellow
titleReady for review
Status
colourGreen
titledone
Status
colourRed
titleflagged

Time macros

Time zones



Panel

On this page

Table of Contents
exclude(On this page).*
stylecircle
typeflat
separatorpipe



 contain a numeric value with the milliseconds elapsed since January 1, 1970, 00:00:00 GMT.The 
UI Text Box
sizemedium
typeinfo

All date-time values are numeric values representing the number of

Excerpt

Fields of type 

Status
subtletrue
titledate
 and 
Status
subtletrue
titledate-time
Status
subtletrue
titlenumber

JWT offers various ways of displaying or calculating date-time values, such as JWT calculated number fields.


Image AddedGeneral information

Time values can be manipulated and might depend on certain factors. These are listed below. 

Time Macros

While the number of milliseconds might be useful in some cases, usually you want to retrieve values that are more readable (e.g. when being used in calculated fields).

Macros are aliases for fixed values. They are often used to convert milliseconds to a more accessible value.


UI Expand
expandedtrue
titleList of all time macros


MacroEquivalent value
{SECOND} 1000
{MINUTE} 1000 * 60
{HOUR} 1000 * 60 * 60
{DAY} 1000 * 60 * 60 * 24
{WEEK} 1000 * 60 * 60 * 24 * 7
{MONTH} 1000 * 60 * 60 * 24 * 30
{YEAR} 1000 * 60 * 60 * 24 * 365


UI Text Box
typetip


Code Block
timeLogged(subtasks())

This example returns the sum of all timelogged on all subtasks of the current issue in milliseconds (see timeLogged() for more examples).

If you want to display the value and maybe compare it wit an original estimate you might need the number of hours instead. Simply divide the results by the {HOUR} time macro and you get the number of hours instead.

Code Block
timeLogged(subtasks())/{HOUR}



The following macros return the day of the week:

Macro Equivalent value
{SUNDAY} 1
{MONDAY} 2
{TUESDAY} 3
{WEDNESDAY} 4
{THURSDAY} 5
{FRIDAY} 6
{SATURDAY} 7


UI Text Box
typetip

Use these macros in the following functions:

dayOfTheWeek()

dayOfTheWeekToString()

dayOfTheMonth()

dayOfTheYear()



The following macros return the month:

MacroEquivalent value
{JANUARY} 1
{FEBRUARY} 2
{MARCH} 3
{APRIL} 4
{MAY} 5
{JUNE} 6
{JULY} 7
{AUGUST} 8
{SEPTEMBER} 9
{OCTOBER} 10
{NOVEMBER} 11
{DECEMBER} 12


UI Text Box
typetip

Use these macros in the following functions:

month()

monthToString()



Time zones

Fields of type date and date-time contain a numeric value with the milliseconds elapsed since January 1, 1970, 00:00:00 GMT.

The number that will be returned by any function using a date or date-

time 
Status
subtletrue
titletimestamp

time timestamp depends on a time zone.


The following time zones are currently available in JWT:
UI Expand
expandedtrue
titleAvailable time zones


Time zone macroOutput
LOCAL or SERVER_LOCALReturns the time zone configured
in
for the server 
where
running Jira
is running
.
USER_LOCALReturns the time zone of
 
the current
logged in
user.
RUN_AS_LOCALReturns the time zone of the selected Run as user.



Languages

When dealing with times and time zones sometimes you need to convert them to text. The text returned depends on the selected language.


UI Expand
expandedtrue
titleAvailable languages


Language macroOutput

SERVER_LANG

Returns the default language configured

Run as user.

for the server running Jira.

USER_LANG

Returns the language of the current user.

RUN_AS_LANGReturns the language of the selected Run as user.



Image AddedAvailable functions

Search
placeholderTextSearch through available parser functions
cqlancestor = 27066604

Page properties report
firstcolumnFunction
headingsShort description, Output, Label
pageSize100
sortByTitle
cqllabel = "parser_function" and space = currentSpace() and parent = currentContent()


Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue