Versions Compared

Key

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


UI Text Box
sizemedium
typeinfo

This function returns the user names of users matching a given email address.

Within Jira it is possible that multiple users have the same email address. In this case a text list with all related user names will be returned. If only one user is excepted though, the function first() can be used.

This function is case insensitive.


Code Block
languagebash
titleSyntax
linenumberstrue
usersWithEmail(emailAddress) #Output: Text list


UI Expand
titleExamples


Parser expressionDescription


Code Block
languagebash
linenumberstrue
usersWithEmail("b.smith@test.com")


This example returns a list with all usernames for the email address b.smith@test.com, e.g.:

[b.smith]


Code Block
languagebash
linenumberstrue
usersWithEmail("B.SMITH@test.com")


This example returns the same usernames like in the above example, since the function is case insensitive.


Code Block
languagebash
linenumberstrue
usersWithEmail("j.doe@company.com")


This example returns a list with all usernames for the email address j.doe@company.com, e.g.:

[j.doe, john-doe, john.doe]


Code Block
languagebash
linenumberstrue
first(usersWithEmail("j.doe@company.com"))


This example returns only the first username with the given email address, e.g.:

j.doe


Code Block
languagebash
linenumberstrue
toString(textOnStringList(toStringList(%{issue.cf10400}, ", "), toString(usersWithEmail(%{seed.text}))))


This example returns the user names for all email addresses, found in a custom text field (with ID 10400) that stores email addresses, e.g.:

b.smith, a.grant, d.conner

UI Expand
titlemore info...

Steps in this example:

  1. Take all individual values found in the custom field (which are separated by ", ") and convert them into a text list with toStringList()
  2. Perform an operation on each (seed) element of that list with textOnStringList()
  3. The operation itself is to convert the email address for each element in the list (%{seed.text}) into a valid user names
  4. Convert the output into a simple text with toString()




UI Expand
titleAdditional information

Parameters used in this function

ParameterInput (data type)Description
emailAddress

Status
subtletrue
titletext list

Text containing a valid email address.



UI Expand
titleOutput

This function returns a

Status
subtletrue
titletext list


UI Text Box
typetip

You might want to wrap the method with the toString() function so that the result can be parsed to a text field.



Image AddedUse cases and examples

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Field type, Automated action, Parser functions
cqllabel = "parser_func_userswithemail" and space = currentSpace()


Page properties
hiddentrue



Status
Tech review

Status
colourGreen
titledone

Style guide

Status
colourGreen
titledone

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



Page properties
hiddentrue


Short description

Returns the user names of users matching a given email address.

Output

Status
subtletrue
titletext list

Available since

Status
subtletrue
colourBlue
title2.1.32

Label