You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 25 Next »

Time Macros

JWT DC offers Time Macros for accessing date and time values like {SUNDAY} for the number of this day in the week (=7). The notion is a "macro", i.e. those keywords are enclosed in {}. In the JWTCloud expression parser, they are noted as constants without curly brackets. 


JWT DC

Mapping

JWT Cloud


{SECOND}

{MINUTE}

{HOUR}

{DAY}

{WEEK}

{MONTH}

{YEAR}

(tick)

(tick)

(tick)

(tick)

(tick)

(tick)

(tick)

SECOND

MINUTE

HOUR

DAY

WEEK

MONTH

YEAR

{SUNDAY}

{MONDAY}

{TUESDAY}

{WEDNESDAY}

{THURSDAY}

{FRIDAY}

{SATURDAY}

(tick)

(tick)

(tick)

(tick)

(tick)

(tick)

(tick)

SUNDAY

MONDAY

TUESDAY

WEDNESDAY

THURSDAY

FRIDAY

SATURDAY

{JANUARY}

{FEBRUARY}

{MARCH}

{APRIL}

{MAY}

{JUNE}

{JULY}

{AUGUST}

{SEPTEMBER}

{OCTOBER}

{NOVEMBER}

{DECEMBER}

(tick)

(tick)

(tick)

(tick)

(tick)

(tick)

(tick)

(tick)

(tick)

(tick)

(tick)

(tick)

JANUARY

FEBRUARY

MARCH

APRIL

MAY

JUNE

JULY

AUGUST

SEPTEMBER

OCTOBER

NOVEMBER

DECEMBER

Time Zones

The JWT DC expression parser offers a couple of time zones which can be used as time zone parameter for the parser functions described in Dates, times and time zones.

All the time zones in Time Zone Abbreviations - Worldwide List can be used as a value for a timezone when using the JWT DC expression parser. 

The JWT Cloud expression parser relies on the List of tz database time zones, column "TZ database name". It has to be quoted when used as a parameter in a JWT Cloud parser function.

For migrating the individual timezone, you have to map the timezone of JWT DC to the timezone in JWT Cloud by using Time Zone Abbreviations - Worldwide List as source and  List of tz database time zones as target. If there are several alternatives, he best way is to select a timezone which has the same UTC offset as the one on JWT DC.

Examples

TimezoneUTC offsetJWT DCJWT Cloud
Coordinated Universal Time+00:00UTC"UTC"
Central Standard Time-06:00CST"US/Central"
Singapore+08:00SGT"Singapore"

This table shows how the constants for timezones in JWT DC can be mapped to JWT Cloud.

JWT DC

Mapping

JWT Cloud

LOCAL-
RUN_AS_LOCAL(tick)RUN_AS_LOCAL
SERVER_LOCAL-
Languages

This table shows how the constants for languages in JWT DC can be mapped to JWT Cloud.

JWT DC

Mapping

JWT Cloud

RUN_AS_LANG(tick)RUN_AS_LANG
SERVER_LANG


-
USER_LANG-

JWT Cloud offers the option of using most common ISO 639-1 Code locales like the two-letter version "en", or the four-letter version "en-gb" etc.. The string is not case sensitive, so "EN" is valid as well. You don't have to use the hyphen(-), an underscore will work as well, i.e. "en-gb" is equivalent to "en_GB". If the language is not available (e.g. "english"), an error is returned.

These locales may be used instead of SERVER_LANG or USER_LANG

The following shows which JWT DC parser functions can be mapped to JWT Cloud parser functions and what needs to be taken into account when doing so.

Parser function

Data Center

Mapping

Parser function

Cloud

Notes
abs()(tick)abs()
acos()--
addDays()(tick)addDays()
addDaysSkippingWeekends()--
addMonths()--
addTime()--
addTimeSkippingWeekends()--
addYears()--
allAvailableOptions()--
allCommentCreators()--
allCommentDates()--
allCommenters()--
allComments()--
allIssuesUnder()--
append()(tick)append()
archivedVersions()--
asin()--
atan()--
attachmentUrls()--
availableItems()--
avg()(tick)avg()
capitalizeWords()--
capitalizeWordsFully()--
cbrt()--
ceil()(tick)ceil()
componentLeader()--
componentLeads()--


cos()--
cosh()--
count()(tick)count()
datePart()(tick)datePart()
dateTime()--
dateTimeToString()(tick)dateTimeToString()
dateToString()(tick)dateToString()
dayOfTheMonth()(tick)dayOfTheMonth()
dayOfTheWeek()(tick)dayOfTheWeek()
dayOfTheWeekToString()--


dayOfTheYear()--
daysInTheMonth()--


defaultUserForRole()--
displayNameToUser()--
distinct()(tick)distinct()
earliestUnreleasedUnarchivedVersion()--
earliestUnreleasedVersion()--
epic()(tick)epic()
escapeHTML()--
except()(tick)except()
fieldChangeTimes()--
fieldHistory()--
fieldValue()(tick)
filledInTransitionScreen()--
filterByCardinality()(tick)filterByCardinality()
filterByFieldValue()--
filterByIssueType()(tick)
filterByPredicate()--
filterByProject()(tick)
filterByProjectCategory()--
filterByResolution()(tick)
filterByStatus()(tick)
filterByStatusCategory()--
filterByValue()(tick)filterByValue()
findModify()--
findPattern()(tick)findPattern()
findPatternIgnoreCase()(tick)findPatternIgnoreCase()
findReplaceAll()(tick)findReplaceAll()
findReplaceAllIgnoreCase()(tick)findReplaceAllIgnoreCase()
findReplaceFirst()(tick)findReplaceFirst()
findReplaceFirstIgnoreCase()(tick)findReplaceFirstIgnoreCase()
first()(tick)first()
floor()(tick)floor()
formatDuration()--
formatWorkDuration()--
fullNameToUser()--
getBoolean()--
getIssueList()--
getIssuesFromProjects()(warning)-


This is a legacy function in JWT DC. Please use issuesFromJQL(), e.g.,

%{issuesFromJQL("project in ('SGC, CRM')")}
getMatchingValue()(tick)getMatchingValue()
getNumber()--
getNumberList()--
getString()--
getStringList()--
getUserKey()--
groupUserBelongsTo()--
hasChanged()--
hour()(tick)hour()
htmlToTxt()--
indexOf()--
intersect()(tick)intersect()
invertList()--
isAClone()--
isActive()--
isBulkTriggeredTransition()--
isInGroup()--
isInRole()--
isJwtTriggeredTransition()--
issueIDFromKey()--
issueKeyFromID()--
issueKeystoIssueList()(tick)issueKeystoIssueList()
issuesAbove()--
issueSecurityLevel()--
issuesFromJQL()(tick)issuesFromJQL()
issuesUnder()--
issuesUnderEpic()(tick)issuesUnderEpic()
issueType()(tick)

issueType()


last()(tick)last()
lastAssigneeInRole()--
lastDayOfTheMonth()--
lastFieldChangeTime()--
latestReleasedUnarchivedVersion()--

latestReleasedVersion()

--
leastBusyUserInRole()--
length()(tick)length()
linkedIssues()(warning)linkedIssues()
log10()--
log()--
matches()(tick)matches()
mathOnIssueList()--
mathOnNumberList()--
mathOnStringList()--
max()(tick)max()
max(list)(tick)max(list)
min()(tick)min()
min(list)(tick)min(list)
minute()(tick)minute()
modulus()(tick)modulus()
month()(tick)month()
monthToString()--
nextDayOfTheWeek()--
nextTime()--
nextUserInGroup()--
nthElement()(tick)nthElement()
numberOfAvailableItems()--
numberOfRemoteIssueLinks()--
numberOfSelectedItems()--
option()--
parent()--
pow()--
previousValue()--
priority()--
project()(tick)

project()


projectCategory()--
projectIDFromKey()--
projectKey()--
projectKeys()--
projectLead()--
projectLeader()--
projectName()(warning)-

Replace the function by using a Jira expression:

%{jiraExpression("new Project(projectName).name")}

where projectName is the parameter of projectName()

projectProperty()--
projectPropertyExists()--
projectType()(warning)-

Replace the function by using a Jira expression:

%{jiraExpression("new Project(projectName.projectTypeKey")}

where projectName is the parameter of projectType()


random()(tick)random()
releaseDates()--
releasedVersions()--
releasedVersionsBySequence()--
remainder()--
replaceAll()(tick)replaceAll()
replaceFirst()(tick)replaceFirst()
resolution()(tick)

resolution()


round()(tick)round()
second()(tick)second()
setBoolean()--
setIssueList()--
setNumber()--
setNumberList()--
setString()--
setStringList()--
shortFormatDuration()--
shortFormatWorkDuration()--
siblingIssues()--
siblingIssuesUnderEpic()(tick)siblingIssuesUnderEpic()
siblingSubtasks()--
similarity()--
sin()--
sinh()--
sort()(tick)sort()

Please note that the variant

sort(issueList, field, order) #Output: Issue list

is not available in JWT Cloud.

sqrt()--
startDates()--
status()(tick)

status()


stringToDate()(tick)stringToDate()

Please note that the variant

stringToDate(text, dateTimePattern, language, country ) #Output: Number

is not available in JWT Cloud.

sublist()(tick)sublist()
substring()(tick)substring()
subtasks()(tick)subtasks()
subtractDatesSkippingWeekends()--
sum()(tick)sum()
tan()--
tanh()--
textOnIssueList()--
textOnNumberList()--
textOnStringList()--
timeDifference()--
timeInStatus()--
timeInValue()--
timeLogged()--
timePart()(tick)timePart()
timesOfTransition()--
timezone()--
toDegree()--
toLowerCase()(tick)toLowerCase()
toNumber()(tick)toNumber()
toNumberList()(tick)toNumberList()
toRadians()--
toString()(tick)toString()
toStringList()(tick)toStringList()
toUpperCase()(tick)toUpperCase()
transitionLinkedIssues()--
transitivelyLinkedIssues()--
trim()(tick)trim()
unescapeHTML()(tick)-
union()(tick)union()
unreleasedVersions()--
unreleasedVersionsBySequence()--
userDisplayName()--
userEmail()--
userFullName()--
userProperty()--
usersInGroup()--
usersInRole()--
usersWhoTransitioned()--
usersWithEmail()--
weekOfTheYear()--
wikiToHTML()--
withinCalendar()--
year()(tick)year()

If you still have questions, feel free to refer to our support team.