QPR Knowledge Base 2017.1

Customizing Action Types for QPR Portal

Customizing Action Types for QPR Portal

Previous topic Next topic No directory for this topic  

Customizing Action Types for QPR Portal

Previous topic Next topic Topic directory requires JavaScript Mail us feedback on this topic!  

For QPR Portal, you can customize the action types which you can attach, for example, to the Discussion section in the Actions tab, to other actions, or to model elements of QPR Metrics and QPR Modeling Client. Customization is done with the help of the actiontypes.ini configuration file. The file is located in the same folder as the QPR_Servers.ini configuration file (usually in the C:\ProgramData\QPR Software\QPR 2017\2017.1\Servers\Settings\<possible instance folder> folder.

 

Using actiontypes.ini, the following customizations are possible:

creating, modifying and removing action types

creating, modifying and removing action attributes

configuring the ordering and positioning of different action attribute groups in the action editor and the action details views

 

The custom action types are checked when the QPR Foundation Server is started. If there is different information regarding action types in QPR Web Application Server, the configuration file in QPR Foundation Server overrides the information in QPR Web Application Server. The system works so that if the QPR Foundation Server is restarted while QPR Web Application Server is running, QPR Web Application Server re-reads all the action definitions from the QPR Foundation Server. You do not need to shut down QPR Foundation Server while modifying action definitions. You can edit the configuration file while QPR Foundation Server is running and then just quickly restart it.

 

The actiontypes.ini file contains the following sections and parameters:

 

[Types] section

Field

Field Type

Optionality

Description

ActionTypes

String

Mandatory

Comma-separated list of section names for action types. The order in which the names are on the list is the order they are listed in the action editor in QPR Portal.

 

[<Action type #1...>] section

Field

Field Type

Optionality

Description

DatabaseId

Integer

Mandatory

Database ID for the action type. If you are modifying an existing action type, do not change the ID. If you are creating a new action type, the number for the database ID has to be 10000 or bigger. Database IDs must be unique so do not give the same ID to two action types.

The database IDs of the standard action types are as follows:

Comment: 1

Lesson: 2

Action plan: 3

Document: 4

Folder: 5

Risk: 14

Strategy Item: 15

Name

String

Mandatory

Name of the action.

PluralName

String

Mandatory

Name of the action in plural.

Attributes

String

Optional

Comma-separated list of action section names for attributes.

Hidden

Integer

Optional

If the value is 1, all existing actions of this type are hidden and new actions of this type cannot be created. If the value is 0 (or the parameter does not exist), the actions are visible and you can create new actions of this type.

DoNotLocalize

Integer

Optional

Defines whether the name of the action is translated in the language of the UI. If the value is 1, the name will not be localized. If the value is 0, the name will be localized if a translation exists in the dictionary. If the translation cannot be found, the original name is used.

DefaultHeader

String

Optional

Default header text to be used.

DefaultDescription

String

Optional

Default description text to be used.

DefaultPublishType

Integer

Optional

Defines the persons the action is published to. The following values are supported:

0 = Me only: publishes the action only to the person who created it.

1 = Users of linked elements: publishes the action to users who have authorization to an element the action is linked to.

2 = Selected users: publishes the action to a certain group of users only.

3 = Everyone: publishes the action to every user

EnableChangeLog

Integer

Optional

Defines whether the change log is enabled for the action type. 0 = disabled, 1 = enabled (default). Note that this setting controls the change log of only a specific action type. For change logs to be in use at all, they must be enabled using the EnableActionChangeLog key in QPR_Servers.ini.

HasSymbol

Integer

Optional

Defines whether the action type has the 'symbol' attribute. 0 = action type does not have the symbol attribute, 1 = action type has the symbol attribute.

 

[<Action attribute #1...>] section

Field

Field Type

Optionality

Description

DatabaseId

Integer

Mandatory

Database ID for the attribute. Database IDs must be unique so do not give the same ID to two attributes. However, different action types can use the same attribute definitions.

Label

String

Mandatory

Label of the attribute.

Type

String

Mandatory

Attribute type. The following types are supported:

Integer

Boolean

Float

Percentage

String

MultiLineString

OptionString

DateTime

Date

Time

Period

Users

User

EmbeddedFile (used to store any kind of a file inside the attribute)

 

Note: If the attribute type is OptionString, then the action attribute section must also list all the available optional values in the following format:

Option_<sequence number starting from 1>=<value>

 

Example:

Option_1=Draft

Option_2=Proposed

Option_3=Under modification

Option_4=Waiting for approval

Option_5=Approved

Option_6=Archived

DefaultValue

String

Optional

String representation of the default value.

Group

String

Optional

Group the attribute belongs to. The group determines where the action attribute is positioned in action editor and details views in QPR Portal. You can customize the positioning by defining parameters in the [<Group #1...>] section.

ValueChangeEvent

String

Optional

Defines the name of the callback event that is triggered by QPR Web Services Foundation when the attribute value is changed. If this is left unspecified, change events will not be triggered for the attribute.

CausesResponsibility

Integer

Optional

This attribute is valid only for action attributes of the user type. If the value is 1, all users listed in the attribute value are responsible for the action.

This means that these users receive, for example, email notifications of the action and the action is visible in the My Responsibilities view of these users in QPR Portal.

ActionOwner

Integer

Optional

This attribute is valid only for action attributes of the user type. If the value is 1, the user listed in the attribute value is the owner of the action. This means that the user will always have update rights for the action even if the user would otherwise have only view rights, provided that the user's license allows such an operation. For example, this setting does not provide update rights to a user with only a Viewer license. Note that only one attribute with this value set to 1 is allowed per action type. If more than one is discovered, only the first entry is used and others are ignored.

DoNotLocalize

Integer

Optional

Defines whether the attribute name is translated in the language of the UI. If the value is 1, the name will not  be localized. If the value is 0, the name will be localized if a translation exists in the dictionary. If the translation cannot be found, the original name is used.

Mandatory

Integer

Optional

Defines whether the attribute must be given a value before the action can be saved. If the value is 1, entering a value for the attribute is mandatory. If the value is 0 (default), entering a value for the attribute is not mandatory. This setting is applicable only to String, MultiLineString, User, and number fields. Attributes that must be given a value are shown with an asterisk after their name in QPR Portal.

WriteOnce

Integer

Optional

Defines whether the value of the attribute can be set only when created, i.e. the attribute's value cannot be modified afterwards by anyone. If the value is 1, the value of the attribute can be set only when the action is created and it cannot be edited once the action is saved. If the value is 0, the value of the attribute can be edited even after the action is saved.

CopyAtReply

Integer

Optional

Defines whether the action attribute value is copied from the immediate parent action when creating a reply. If the value is 0 (default), the value of the immediate parent action is not copied. If the value is 1, the value of the immediate parent action is copied.

StringDictionary

String

Optional

Can be used to add any number of key/value string pairs into a single attribute. Any single value can be accessed by giving the key as sub attribute for the attribute name (for example, status.previousresult). The key must always be a valid script name.

 

[<Group #1...>] section

Field

Field Type

Optionality

Description

LayoutPosition

String

Optional

The name of the layout group in the template used for this attribute group. The value is case sensitive. Default value is Left.

OrderNumber

Integer

Optional

Defines the attribute group order in the layout position group. If inappropriate value is given, the order is last.

GroupHeader

String

Optional

Defines the translated header text. For more information on customized translations see the Customizing Terminology in QPR Applications topic.

 

The order of the sections is not relevant, nor is the order of the parameters within the sections. All mandatory parameters must be included in the sections. There can be as many sections for different action types and attributes as you want to define.

 

If the actiontypes.ini file exists, only those action types are visible in QPR Portal that are defined in the file.

 

Though you can delete action type attributes, there are some standard attributes that you cannot remove. These are:

 

Header

Description

Publish for type

Parent/child actions

Parent external objects

Creator

Creation date

Last modifier

Last modification date

 

Note: If you have made some customization in QPR 7.5 or in an earlier release to the qpr.ini configuration file regarding option type attributes, you have to transfer these manually to the actiontypes.ini file. Otherwise the customizations will not be in use. To do this, copy the relevant sections from qpr.ini and paste these sections to actiontypes.ini. For example, you have customized the option texts of UMS Comment Categories by adding more options. To include these customizations, first copy the following attributes from your qpr.ini file:

 

Option_1=Not categorized

Option_2=Agree completely

Option_3=Agree to some extent

Option_4=No opinion

Option_5=Disagree to some extent

Option_6=Disagree completely

 

Then after copying, paste these attributes to the [CommentCategory] section in the actiontypes.ini file by replacing the possibly existing option attributes in that section.

 

The correspondences between the option type attribute sections in qpr.ini and actiontypes.ini are listed in the following table:

 

Section name in qpr.ini

Section name in actiontypes.ini

[UMS Document Status Options]

[DocumentStatus]

[UMS Initiative Status Options]

[ActionPlanStatus]

[UMS Comment Category Options]

[CommentCategory]

[UMS Action Plan Category Options]

[ActionPlanCategory]

[UMS Lesson Category Options]

[LessonCategory]

[UMS Document Category Options]

[DocumentCategory]

[UMS Risk Category Options]

[RiskCategory]

[UMS Risk Status Options]

[RiskStatus]

[UMS Risk Severity Options]

[Severity]

[UMS Strategy Item Category Options]

[StrategyItemCategory]

[UMS Strategy Item Status Options]

[StrategyItemStatus]

 

 

You can also add your own icons for the action types you have customized. The icons are stored under <web content root>\qprsoftware\portal\images folder (with default settings the web content root folder is C:\Inetpub\wwwroot). This folder also includes the icons for all action types that exist by default. To add new icons, create a GIF file named icon_<action type name>.gif for each customized action type. If the name of the action type contains spaces, replace the spaces with underscores. For example, if the customized action type is called "meeting status", its icon is named icon_meeting_status.gif. The name of the icon is never translated regardless of the language of the user interface. The recommended size of the icon is 16 x 16 pixels. In addition, in order to use filtering for your customized action types in the QPR Portal search, you need to have also the following files in the <web content root>\qprsoftware\portal\images folder:

btn_<action type name>_e.gif: Enabled button

btn_<action type name>_eh.gif: Enabled and highlighted button (e.g. mouse hovering over the button)

btn_<action type name>_ec.gif: Enabled and clicked button

btn_<action type name>_es.gif: Enabled and selected button

 

 

Warning: Be careful when making changes to the actiontypes.ini file since it may easily cause loss of data.