-
Add custom column settings:
-
Override getCustomColumnSettingsMapList () in emxGantt JPO.
-
Call super.getCustomColumnSettingsMapList. It will return a MapList.
-
Run getCustomColumnSettingsMapList () which will receive 3
values in the argument: objectId, rootType, and viewId.
-
Create a separate map for each custom attribute you want to
display in the Gantt chart table.
-
Populate the map with the following keys:
-
ProgramCentralConstants.COLUMN_LABEL_PROPERTY_KEY:
The value is the property key which will be added in the
Project Management
string resource properties file.
- ProgramCentralConstants.COLUMN_VALUE_DATA_TYPE:
The value is the data type of the column value. Supported
data types are String, Float, and Date.
An enum has been provided which has all possible values
for this key. You must use this enum to set the value for this key.
The values are as follows:
String: CustomColumnDataTypeEnum.STRING.getDatatype()
Float: CustomColumnDataTypeEnum.FLOAT.getDatatype()
Date: CustomColumnDataTypeEnum.DATE.getDatatype()
- ProgramCentralConstants.COLUMN_SELECTABLE:
Selectable which value will be shown in Gantt chart
column.
- ProgramCentralConstants.COLUMN_INDEX:
The value is the index at which the user wants to add the
custom attribute column.
- ProgramCentralConstants.COLUMN_EDITABLE:
This value will decide if the added column will be
editable or read-only. To edit the value, the user has to double-click the
column. A date chooser will appear at the right side for a date type column.
- ProgramCentralConstants.COLUMN_EXCLUDE_IN_REFINEMENT:
This value decides if the added column will appear in the
refinement or not.
-
Add all populated maps to MapList which is returned at step
b.
-
Return the MapList.
-
Make the following changes in dpm-services.xml and
tsk-services-v2.xml:
-
Open MQL from the server directory (for example,
"C:\enoviaV6R2019x\server\win_b64\code\bin\mql.exe").
-
MQL> set context user creator;
-
MQL> verb on;
-
In cases where a custom attribute is added on the "Task
Management" type: run
MQL> print page tsk-services-v2 output
"<directory path>\tsk-services-v2.xml". The file name should
be tsk-services-v2.xml. It will save a local copy of tsk-services-v2.xml in
your directory path.
-
Add the fields you want to fetch for the custom column in the
following format under the <ds:service name="tasks"> tag in the service
file saved in step d.
For example,
<ds:field name="{FieldName}"
><ds:selectable expression="{ Expression }" format="{ Format_Of _Data }"
type="bus" autosave="true"/></ds:field>
{FieldName} : field name must be the same as the property key
value for the custom column label value or as the
ProgramCentralConstants.COLUMN_LABEL_PROPERTY_KEY" value defined in the English
file.
{Expression}: same as the selectable given in the JPO
configuration.
{format_Of _Data} : isodate, in cases when the column is of
the Date type.
-
After modification, put the modify service in MQL using the
following command:
MQL> modify page tsk-services-v2 file
“<directory path>\tsk-services-v2.xml”;
-
In cases where a custom attribute is added on the "Project
Space" type: run
MQL> print page dpm-services output "<directory
path>\dpm-services.xml"; The file name should be
dpm-services.xml. It will save a local copy of dpm-services.xml in your
directory path.
-
Add the fields you want to fetch for the custom column in the
following format under the <ds:service name="dpm.projects"> tag in the
service file saved in step g.
For example:
<ds:field name="{FieldName}"
><ds:selectable expression="{ Expression }" format="{ Format_Of _Data }"
type="bus" autosave="true"/></ds:field>
{FieldName} : field name must be same as the property key
value for the custom column label value or as the
ProgramCentralConstants.COLUMN_LABEL_PROPERTY_KEY" value defined in the English
file.
{Expression}: same as the selectable given in the JPO
configuration.
{format_Of _Data} : isodate, if the column is a Date type.
-
After modification, put the modify service in MQL using the
following command:
MQL> modify page dpm-services file
“<directory path>\dpm-services.xml”;
|