Documentation for JIRA 4.2. Documentation for other versions of JIRA is available too.

Skip to end of metadata
Go to start of metadata
Icon

User Format plugin modules are implemented in the JIRA 3.13 release. They are not available in previous releases.

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.

(info) For more information about plugins in general, read JIRA Plugin Guide. To learn how to install and configure plugins (including macros), read Installing and Configuring Plugins.

The User Format Plugin Module

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

* 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:

    Type

    Description

    profileLink

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

    fullName

    Safely displays the user's full name.

    profileLinkSearcher

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

    profileLinkExternal

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

    profileLinkActionHeader

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

    fullProfile

    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:

ProfileLinkUserFormat.java

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

profileLink.vm

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

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

  • No labels