We're updating the issue view to help you get more done. 

Standardise security.user name attributes, and provide reporting support

Description

There is currently no standard approach for storing user names and qualifications in security.user, leading to various strategies e.g.

name

description

Dr Joe Bloggs

BVSc MVS

JB

Dr Joe Bloggs

Dr Joe Bloggs

Dr Joe Bloggs, BVSc MVS

JB

Dr Joe Bloggs

This complicates writing standard reports as the appropriate fields can't be selected.
To improve this, the follow nodes will be added to security.user:

  • title

  • firstName

  • lastName

  • qualification
    Initially, these will all be optional. The existing name and description nodes will continue to be used as a fallback.

The following reporting functions will be provided:

  • user:format(user, style)
    Formats the user name, according to the style, which may be one of short, medium or long.

  • user:format(id, style)
    As above, but uses a user id, and works in top-level SQL jaspereports.

The style option corresponds to new practice options::

  • Short User Name Format

  • Medium User Name Format

  • Long User Name Format

Each of these options is a lookup.userNameFormat, which contains an xpath expression.
The following lookup.userNameFormats will be predefined:

  • Name Only - concatenates the firstName and lastName, or the name, if neither is defined

  • Title & Name - prepends the title to Name Only, if the title is defined

  • Title, Name & Qualifications - appends the qualifications to Title and Name, if defined

  • Description - returns the description

  • Username - returns the user name (i.e. login name)

The practice options will default as follows:

  • Short User Name Format - Name Only

  • Medium User Name Format - Title & Name

  • Long User Name Format - Title, Name & Qualifications

Environment

None

Status

Assignee

Tim Anderson

Reporter

Tim Anderson

Labels

None

Components

Fix versions

Priority

Minor