Data model

Data model

Overview

Smart Reports Add-On provides custom data types to expose various entities from JIRA to your reporting needs.This data model provides several features:

 

  • It hides complexity of JIRA internal entities and its relations.

  • It handles security access and permissions. One cannot report from entities he cannot access in JIRA itself.

  • It supports user in formatting or translating.

  • It simplifies and unifies data types used in your custom report.

Some of fields that can be used in reports have this custom types. Main abstraction for such fields are expressed with com.codedoers.jira.smartreports.model.Model. This class provieds method for access or fields for a specific datatype - this method is a simple get(propertyName). For example if a datafield describes a user then it should be expressed via com.codedoers.jira.smartreports.model.User which extends from Model class. The User class has properties such as email, name or display name. 

You can declare Author of issue as a User:

<field name="Author" class="com.codedoers.jira.smartreports.model.User"/>

 And then you can use any of its properties through a get method. Here is an example for display name

$F{Author}.get("DisplayName")

 Classes

com.codedoers.jira.smartreports.model.Model

This class is an essential abstraction for all non trivial fields you can use in reports. It provides following methods:

Result type

 Name

Parameters

Description

java.lang.Object

 get

String property

Provides any property for specific type of field in your repors. See other classes for a list of properties that can be accessed through this method.

Model class does not provide any properties itself.

com.codedoers.jira.smartreports.model.Version

Version extends Model. It has following properties:

Name

Type

Description

Id

Long

Id  of this version

Name

String

Name of the version. This name you see in JIRA

ReleaseDate

Date

Date when the version is released. In not released - this property is null

Archived

boolean

True if the version is archived, false otherwise

Released

boolean

True if the version is released, false otherwise

com.codedoers.jira.smartreports.model.Group

Group extends Model. It has following properties:

Name

Type

Description

Name

String

Name of the group

com.codedoers.jira.smartreports.model.User

User extends Model. It has following properties

Name

Type

Description

Username

String

Username of the specific user

Key

String

Key of the entity represented by the user (as database key)

Name

String

Name of the user. First and last name combined

Email

String

Email of the specified user

DisplayName

String

Display name of the specific user

com.codedoers.jira.smartreports.model.Project

Projects extends Model. It has following properties:

Name

Type

Description

Name

String

Name of the project

Key

String

Unique key of the project

com.codedoers.jira.smartreports.model.DictionaryItem

DictionaryItem extends Model. It has following properties:

Name

Type

Description

Name

String

Name of the item

Description

String

Description of the item

com.codedoers.jira.smartreports.model.Option

com.codedoers.jira.smartreports.model.Issue