User Format Plugin Module


User Format plugin modules are available in JIRA 3.13 and later.

User Format plugin modules are used to display user details in JIRA. JIRA ships with a number of default user format implementations that are used to render the full names for users system wide. You can use User Format plugin modules to implement custom behaviours for these user details. Here are some examples:

  • Display a profile picture next to the user.
  • Link to an external profile page.
  • Display special avatars for users in certain groups.

For more information about plugins in general, read JIRA Developer Documentation. To learn how to install and configure plugins (including macros), read Managing Add-Ons.

The User Format Plugin Module

Here is an example atlassian-plugin.xml file containing a single user format plugin module:

<atlassian-plugin name='User Format' key='jira.user.format' i18n-name-key="">
        <description key="user.format.plugin.desc">This plugin renders a user in JIRA.</description>
        <vendor name="Atlassian Software Systems" url=""/>
        <application-version min="4.0" max="4.0"/>

    <user-format key="profile-link-user-format" i18n-name-key="" name="Profile Link User Format"
            class="com.atlassian.jira.plugin.profile.ProfileLinkUserFormat" system="true">
        <description key="">Simple link to a user's profile page displaying the user's full name.</description>
        <type i18n-name-key="">profileLink</type>
        <resource type="velocity" name="view" location="templates/plugins/userformat/profileLink.vm"/>

* the class attribute of user-format needs to implement com.atlassian.jira.plugin.profile.UserFormat.

  • the resource elements (one or more) can be used to implement complicated rendering using velocity.
  • The type attribute defines where the user format will be used. The system types that are pre-defined include:




    Simple link to a user's profile page displaying the user's full name.


    Safely displays the user's full name.


    Simple link to a user's profile page displaying the user's full name from the issue navigator.


    Simple link to a user's profile used in emails, word documents, excel downloads etc.


    Simple link to a user's profile in issue action headers such as comments.


    Full user description including user operation links and report links.

Choosing your User Format

Once you've added your own user format, JIRA's 'Look and Feel' administration allows you to select the User Format that will be used across JIRA:
Screenshot: View Look and Feel Configuration

Screenshot: Edit Look and Feel Configuration - User Format

Sample Implementation

The following example demonstrates how to implement a user format that prints a user's full name with a link to the user's profile page in JIRA.

1. First, you will need an implementation of the UserFormat interface:
package com.atlassian.jira.plugin.profile;

import com.atlassian.jira.user.util.UserUtil;
import com.opensymphony.user.User;

import java.util.Map;

 * Very simple implementation that only renders the users full name with a link to the user's profile page. If the
 * username is null, it will display 'Anonymous'.  If no user matching the username can be found, ony the username
 * will be printed.
 * @since v4.0
public class ProfileLinkUserFormat implements UserFormat
    private UserFormatModuleDescriptor moduleDescriptor;
    private UserUtil userUtil;
    private final UserFormatManager userFormatManager;

    public ProfileLinkUserFormat(UserFormatModuleDescriptor moduleDescriptor, UserUtil userUtil, UserFormatManager userFormatManager)
        this.moduleDescriptor = moduleDescriptor;
        this.userUtil = userUtil;
        this.userFormatManager = userFormatManager;

    public String format(String username, String id)
        final Map params = getInitialParams(username, id);
        return moduleDescriptor.getHtml(VIEW_TEMPLATE, params);

    public String format(String username, String id, Map params)
        final Map velocityParams = getInitialParams(username, id);

        return moduleDescriptor.getHtml(VIEW_TEMPLATE, velocityParams);

    private Map getInitialParams(final String username, final String id)
        final User user = userUtil.getUser(username);
        final String fullName = userFormatManager.formatUser(username, FullNameUserFormat.TYPE, id);
        return"username", username, "user", user, "fullname", fullName, "id", id);

2. You will then need to implement the view velocity template that used to display the user:

#if ($username)
    #set ($quote = '"')
        #set($author = "<a id=${quote}$!{id}_${textutils.htmlEncode($username)}${quote} href=${quote}${baseurl}/secure/ViewProfile.jspa?name=${velocityhelper.urlencode($username)}${quote}>$textutils.htmlEncode($fullname)</a>")
        #set($author = $textutils.htmlEncode($username))
    #set($author = $i18n.getText('common.words.anonymous'))

3. Finally, you can use this plugin to print the user's details, as shown below:

$userformat.formatUser($, 'profileLink', "worklog_${}_header")

In this case, profileLink the type and worklog_${}_header is the id that is passed to the UserFormat.format method for rendering.

Was this page helpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport