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 NameParametersDescription
java.lang.Object getString propertyProvides 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:
NameTypeDescription
IdLongId  of this version
NameStringName of the version. This name you see in JIRA
ReleaseDateDateDate when the version is released. In not released - this property is null
ArchivedbooleanTrue if the version is archived, false otherwise
ReleasedbooleanTrue if the version is released, false otherwise

com.codedoers.jira.smartreports.model.Group

Group extends Model. It has following properties:
NameTypeDescription
NameStringName of the group

com.codedoers.jira.smartreports.model.User

User extends Model. It has following properties
NameTypeDescription
UsernameStringUsername of the specific user
KeyStringKey of the entity represented by the user (as database key)
NameStringName of the user. First and last name combined
EmailStringEmail of the specified user
DisplayNameStringDisplay name of the specific user

com.codedoers.jira.smartreports.model.Project

Projects extends Model. It has following properties:
NameTypeDescription
NameStringName of the project
KeyStringUnique key of the project

com.codedoers.jira.smartreports.model.DictionaryItem

DictionaryItem extends Model. It has following properties:
NameTypeDescription
NameStringName of the item
DescriptionStringDescription of the item

com.codedoers.jira.smartreports.model.Option

com.codedoers.jira.smartreports.model.Issue