If you have customized action types for QPR Portal and want to make the filters and fields for the new custom action type available in the View Designer views of QPR Portal, you must modify the actionanalysisfields.ini and actionhierarchyfields.ini files located in the C:\ProgramData\QPR Software\QPR 2019\2019.1\Servers\Templates\WAS\Portal folder. The actionanalysisfields.ini file controls the View Designer and View Filter Designer views in the Analysis, By User and By Time views of the Actions tab, whereas the actionhierarchyfields.ini file controls the View Designer and View Filter Designer views in the Discussion view of the Actions tab and in the Actions views of the Processes and Scorecards tabs.
For every new attribute definition added to actiontypes.ini, add a new section in both actionanalysisfields.ini and actionhierarchyfields.ini files. The section name must be the same as the label used in actiontypes.ini for that action attribute. Note that section names must not contain spaces while it is natural for labels to have them. When the names are evaluated, spaces in the actiontypes.ini labels are ignored. The comparison is also case insensitive. See the example below:
actiontypes.ini
[RequiredAttendees]
DatabaseId=10003
Label=Required attendees
Type=Users
Group=Roles
The Label field in the example above dictates that we must create the following section into actionanalysisfields.ini and actionhierarchyfields.ini files:
[RequiredAttendees]
Label=Required attendees
ValueType=user
Note that due to the case insensitive comparison also [Requiredattendees] or [requiredattendees] are valid section names.
The following definitions are obligatory, so you must add them in the attribute section of both actionanalysisfields.ini and actionhierarchyfields.ini files:
Label=<field name>
Where <field name> is the native-language name (meaning that it is intended to be translated) of the field used in the view designer and views for this field.
ValueType=<value type>
Where <value type> is the type of the attribute value. This determines how the value behaves when it is used in filtering and sorting. Note that the type must be in all lowercase.
The supported values are:
•type: sorting behavior and filtering options
•string: text sorting and text filtering options
•number: number sorting and number filtering options
•date: date sorting and date filtering options
•user: user sorting and user filtering options
The following definitions are optional, so you can add them in the attribute section of both actionanalysisfields.ini and actionhierarchyfields.ini files, if desired:
Alias=<alias for attribute>
Where <alias for attribute> is an unique alias within the attributes described in the ini file. Note that there cannot be two attributes with the same alias in the same ini file. The alias value can include only letters. Also, the alias must be shorter than the section name in order to be of any use. If this is not possible, leave the alias undefined.
FieldOnly=<0 = false (default), 1 = true>
If true, the attribute can only be used as a selected field and not as a filter.
FilterOnly=<0 = false (default), 1 = true>
If true, the attribute can only be used as a filter and not as a field.
FixedWidth=<width in pixels>
This setting is available only in the analysis views, so it can be added only to actionanalysisfields.ini, not to actionhierarchyfields.ini. It can be used to set the default column mode to a fixed width of specified number of pixels instead of the relative width.
ValueField=<the attribute used when applying filters to this field>
The ValueField field of the added section must be the same as the label in actiontypes.ini with all the whitespaces removed.
ShownValue=<the attribute used in showing the user the value of the field in question>
The ShownValue field of the added section must be the same as the label of that attribute in actiontypes.ini with all the whitespaces removed.
SortField=<the attribute used in doing field based sorting>
The SortField field of the new section must be the same as the label in actiontypes.ini with all the whitespaces removed.
Also, add the section name to the end of Fields value in the [Definitions] section of both actionanalysisfields.ini and actionhierarchyfields.ini files. The field is a comma-separated list of section names, so remember to add a comma before the section name.
For example, you have added a custom action type field called MeetingDate in actiontypes.ini. To enable this field in the View Designer and View Filter Designer views of the Discussion and Analysis views, proceed as follows:
1.Add a section called [MeetingDate] in both actionanalysisfields.ini and actionhierarchyfields.ini files. Type the label and value type below the section name as below.
[MeetingDate]
Alias=MDT
Label=Meeting Date
ValueType=date
ShownValue=MeetingDate
ValueField=MeetingDate
SortField=MeetingDate
2.Add "meeting date" to the end of the [Definitions] section of both actionanalysisfields.ini and actionhierarchyfields.ini files, separated by a comma. See the example below:
[Definitions]
Fields=header, type, prettyname, description, fullid, modifier, lastmodifieddate, creator, createddate, category, owner, assignedto, approvedby, approveddate, startdate, deadline, status, progress, version, severity, identifiedby, identified, probability, impactminimization, mitigation, impact, rating, notes, validfrom, validto, attachments, childactions, typename, linkedto, linkedtomodel, linkedtoscorecard, linkedtoscorecardsymbol, linkedtosubprocess, datestamp, meetingdate
Template=analysis_row.tpl
HeaderTemplate=analysisheader_row.tpl
FieldTemplate=dynamicfields\action$field.tpl
HeaderFieldTemplate=dynamicfields\action$fieldheader.tpl
FooterTemplate=analysisfooter.tpl
3.Save the changes you made to actionanalysisfields.ini and actionhierarchyfields.ini files, and restart QPR Web Application Server. The MeetingDate field is now visible in the View Designer and View Filter Designer views.