Page tree

Versions Compared

Key

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

...

FunctionDescriptionUsing in ConfiForms Field macroUsing in ListVIew/PlanView/CalendarView or in IFTTT macro body
urlencode

Does URL encode on given value, see "urlEncode" method in

https://developer.atlassian.com/static/javadoc/confluence/4.0/reference/com/atlassian/confluence/util/GeneralUtil.html

myfield.urlencode[entry.myfield.urlencode]
escapeXML

Escapes XML on given value, see "escapeXml" method in

https://developer.atlassian.com/static/javadoc/confluence/4.0/reference/com/atlassian/confluence/util/GeneralUtil.html

myfield.escapeXml[entry.myfield.escapeXml]
escape

Escapes string as in "escapeForHtmlAttribute" method in

https://developer.atlassian.com/static/javadoc/confluence/4.0/reference/com/atlassian/confluence/util/GeneralUtil.html

myfield.escapeForHtmlAttribute[entry.myfield.escapeForHtmlAttribute]
formatDate
Tries to format date fields in the specified format, expects date format as in http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.htmlmyfield.formatDate(JAVA_FORMAT)

[entry.myfield.formatDate(JAVA_FORMAT)]

(no quotes)

jiraDate
Same as "formatDate" method above, but specifies constant dateformat pattern (yyyy-MM-dd), suitable for JIRA REST APImyfield.jiraDate[entry.myfield.jiraDate]
jiraDateTime
Same as "formatDate" method above, but specifies constant dateformat pattern ("yyyy-MM-dd'T'HH:mm:ss.SSSZ"), should be compatible with ISO 8601 standard as JIRA requires when setting timestamps to JIRA fieldsmyfield.jiraDateTime[entry.myfield.jiraDateTime]
escapeJSON
Escapes illegal characters in the field value to generate a valid JSON property. New lines, quotes, tabs and etc will be properly escapedmyfield.escapeJSON[entry.myfield.escapeJSON]
asArray
asArrayMultiSelect
asArrayMultiUserPicker

 

Tries to create an array from the value. Useful when you want to pass ConfiForms multi-select values to JIRA. Something like

No Format
"customfield_XXXX" : [[entry.myfield.asArray]]
 
this will generate
 
"customfield_XXXX" : ["val1","val2"]
 
assuming "myfield" field is a multi select and has 2 values: val1 and val2

 

There are variations to support other multi-select fields in JIRA

https://developer.atlassian.com/jiradev/jira-apis/jira-rest-apis/jira-rest-api-tutorials/jira-rest-api-example-create-issue#JIRARESTAPIExample-CreateIssue-MultiSelect

  • asArrayMultiSelect
  • asArrayMultiUserPicker (can be used to generate arrays for both: multi-user and multi-group field types)

 

ConfiForms (FormView) Registrations Control
pageTitleConfiForms Backlog
formNameconfiFormsIssues
registrationMessageThank you for your request. We will contact your shortly
registrationButtonLabelLet us know if something you want to use is missing

 

myfield.asArray

myfield.asArrayMultiSelect

myfield.asArrayMultiUserPicker

[entry.myfield.asArray]

[entry.myfield.asArrayMultiSelect]

 [entry.myfield.asArrayMultiUserPicker]

replaceCRLFWithBR
Replaces CR/LF with <BR/> to show with line brakes in HTML (useful when you reference the textarea field using [entry.] notation)myfield.replaceCRLFWithBR[entry.myfield.replaceCRLFWithBR]
asUserFullNames
Works only with User multi-select fields and shows list of full names for selected usersmyfield.asUserFullNames[entry.myfield.asUserFullNames]
asUserEmails
Works only with User multi-select fields and shows list of emails for selected usersmyfield.asUserEmails[entry.myfield.asUserEmails]
asUserNames
Works only with User multi-select fields and shows list of usernames for selected usersmyfield.asUserNames[entry.myfield.asUserNames]
friendlyDate
Formatting date and date/time field types with https://docs.atlassian.com/confluence/latest/com/atlassian/confluence/core/datetime/FriendlyDateFormatter.htmlmyfield.friendlyDate[entry.myfield.friendlyDate]
asCount
Returns size of a collection for multi-value fields or number of chars for other typesmyfield.asCount[entry.myfield.asCount]
asSize
Returns size of a collection for multi-value fields or number of chars for other types (same as "count")myfield.asSize[entry.myfield.asSize]
asLength
Returns size of a collection for multi-value fields or number of chars for other typesmyfield.asLength[entry.myfield.asLength]
formatCurrency

 

Tries to format value as currency using either default or given format

https://docs.oracle.com/javase/7/docs/api/java/text/DecimalFormat.html

If value could not be formatted according to given format then value will be returned as is

Info

Can be used with any number (and not only currency)

myfield.formatCurrency(JAVA_FORMAT)

myfield.formatCurrency()

(default decimal format is used if empty)

[entry.myfield.formatCurrency(JAVA_FORMAT)]

(no quotes, JAVA_FORMAT could be empty, default will be used)

 

[entry.myfield.formatCurrency(# ###.##)]

[entry.myfield.formatCurrency(# ###.00)]

formatNumber
alias to formatCurrency

myfield.formatNumber(JAVA_FORMAT)

myfield.formatNumber()

(default decimal format is used if empty)

[entry.myfield.formatNumber(JAVA_FORMAT)]

[entry.myfield.formatNumber(# ###.##)]

[entry.myfield.formatNumber(# ###.00)]

asFilteredBy(FILTER)

Very powerful function to extract the value by given filter (mostly used for multi-value fields).

Especially useful with Multi-select fields which are of type "smart fields", the ones referencing other forms and fields

Example:

You have one form which has a field called "mf" which holds multi-value references to another form which has the following fields: name, surname, position

Then... when showing the data from the first form you can actually show only specific choices.

For example:

  • entry.mf.asFilteredBy(name:Alex) - to show only persons selected with name Alex only (here "name" references a field in 2nd form)
  • entry.mf.asFilteredBy(surname:Ve*) - to show only persons selected with surnames starting with "Ve" only (here "surname" references a field in 2nd form)
  • entry.mf.asFilteredBy(position:CEO) - to filter OUT all those selected who are NOT in CEO position
entry.mf.asFilteredBy(FILTER)

Filter should be in a format:

property:filter

[entry.mf.asFilteredBy(name:Alex)]

The following filters are supported:

  • value*
  • *value
  • *value*
  • *
  • [empty]

 

trimAllSpaces

Removes all the spaces in the field value.

Can be used when creating page labels automatically from ConfiForms field values and want to ensure the value is taken as a label and not split by spaces into differenet labels

entry.myfield.trimAllSpaces[entry.myfield.trimAllSpaces]
Info

If entry value is null or could not be formatted according to rules then value is returned as-is 

...