API to be used within Velocity Templates (v 3.2)
- Friederike Kneuper (Deactivated)
Owned by Friederike Kneuper (Deactivated)
Mar 31, 2020
1 min read
Loading data...
The User Profile Plugin extends the Velocity context by a component which allows to access user profile data from Velocity templates.
The velocity context component has the name uppVelocityApi. It provides one method with the following signature:
getProperty(user, profileElementName):
- This method returns the value of the given profile element for the given user. It accepts the following parameters:
- user: The user to retrieve the value for. Type: com.atlassian.user.User
- profileElementName: Default name of the profile element, typically the English name. Type: String
- Profile element names do not need to be unique. This method will return the value of the first found field with the name, which is visible (i.e. not hidden). To determine the first field, the order as defined at the administration is used.
Usage
#set( $user = $userAccessor.getUser("userWithProfileElement") ) #set($profileElementName = "Mobile Phone" ) ##set($mobileNumber = $uppVelocityApi.getProperty($user, $profileElementName) )
All Versions
- Release (v 3.5)
- Release (v 3.4)
- Release (v 3.3)
- Release (v 3.2)
- Release (v 3.1)
- Release (v 3.0)
- Release (v 2.1)
- Release (v 2.0)
- Release (v 1.12)
- Release (v 1.11)
- Release (v 1.10)
- Release (v 1.9)
- Release (v 1.8)
- Release (v 1.7)
- Release (v 1.6)
- Release (v 1.5)
- Release (v 1.4)
- Release (v 1.3)
- Release (v 1.2)
- Release (v 1.1)