Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
outlinetrue
stylenone

Quick Start Guide

Jira Plugin

Download the following files

...

Make sure the User Profiles for Jira Add-on is already installed on your Confluence system.

Check Installation and Licensing (v 2.2) for further information.

Scriptrunner

General

Our Java API may also be access via Scriptrunner. To be able to do that you have to follow the steps which are described in the official Scriptrunner documentation, which can be found here: https://communardoscriptrunner.atlassianadaptavist.netcom/wikilatest/spaces/UPJ/pages/473727121/Installation+and+Licensing+v+2.2 for further informationjira/scripting-other-plugins.html

Example

To provide you a more easy way to start developing scripts with Scriptrunner, we prepared a minimal example, which provides you our API managers with whom you can access profile elements and their data:

Code Block
import com.onresolve.scriptrunner.runner.customisers.PluginModule
import com.onresolve.scriptrunner.runner.customisers.WithPlugin
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.sal.api.user.UserKey
import de.communardo.atlassian.plugins.userprofile.external.api.service.UppProfileElementManager
import de.communardo.atlassian.plugins.userprofile.external.api.service.UppProfileElementDataManager

@WithPlugin("de.communardo.jira.plugins.userprofile")

@PluginModule
UppProfileElementManager uppProfileElementManager
@PluginModule
UppProfileElementDataManager uppProfileElementDataManager

log.info(uppProfileElementManager.getProfileElements())
log.info(uppProfileElementDataManager.getProfileElementData(new UserKey(ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser().getKey())))

The example prints the currently available profile elements and the available element data for the current user in the log (info log level, which may prevent you from seeing anything per default, so maybe use error instead if you want to directly see something).

Internal structure and basic usage

The UPJ Java API consists out of two basic elements: the profile element and the profile element data. Profile elements can be added and removed in the UPJ administration (check https://communardo.atlassian.net/wiki/spaces/UPJ/pages/473727136/Create + and + Edit + User + Profile + Elements +(v + 2.2) for further information). Values may afterwards be added for every user via an LDAP sync or by manually editing user profiles (in the administration or the user does it on his own) or even by using our new Java API.

...