I am attempting to add the attribute "severity" to the incident view. I have added it to the incident module configuration file, and run it through the customization toolkit, which returned a number of SQL statements required to add it to various views. When I executed the statements, the database model and schema were fine, but I still cannot find my new field in any of the user screens in the application.
I know that incident is really a child class to the ticket, but I am having trouble seeing the results of my edits…..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you that was perfect advice, I now can see my ENUM field, however when I open a new incident it is already populated with the default value and there is no drop-down box. I have reviewed the configs for other fields that do have a drop-down and I cannot find the difference. I added the field as a varchar(20) but am not sure how to make the dropdown appear.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The way the field is displayed in edition depends the possible values for the field, as listed in its definition in iTop.
If you declare the field as an enum
Hi dflaven, I figured it out, the piece I was missing to make the field a drop-down list was in the model for the ticket module.
// Lifecycle
MetaModel::Init_DefineState(
"new",
array(
"attribute_inherit" => null,
"attribute_list" => array( 'urgency' => OPT_ATT_MUSTCHANGE,
'priority' => OPT_ATT_READONLY,
'severity' => OPT_ATT_MUSTCHANGE,
),
Changing severity from READ ONLY to MUST CHANGE did the trick! I love this stuff. Thank you for your help….
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, great. The meaning of such flags in the life cycle of the object is:
READONLY => Ok, you got it, the field cannot be edited by the end user
MUSTCHANGE => When the ticket enters the specified state, the end-user is prompted to change the value of this field
MUSTPROMPT => When the ticket enters the specified state, the end-user is prompted to check the value… but not forced to change it
If you declare nothing about a field in the life cycle, the field is *just* editable as any other field of the ticket.'
Best regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am attempting to add the attribute "severity" to the incident view. I have added it to the incident module configuration file, and run it through the customization toolkit, which returned a number of SQL statements required to add it to various views. When I executed the statements, the database model and schema were fine, but I still cannot find my new field in any of the user screens in the application.
I know that incident is really a child class to the ticket, but I am having trouble seeing the results of my edits…..
Hi,
The details of an object (and the form to edit it) is driven by the 'ZList' definition.
Check in the class definition for the line:
Thank you that was perfect advice, I now can see my ENUM field, however when I open a new incident it is already populated with the default value and there is no drop-down box. I have reviewed the configs for other fields that do have a drop-down and I cannot find the difference. I added the field as a varchar(20) but am not sure how to make the dropdown appear.
The way the field is displayed in edition depends the possible values for the field, as listed in its definition in iTop.
If you declare the field as an enum
Then the field will appear as a drop-down list in the object's form and the toolkit will propose to create the field as an ENUM in SQL.
Did you put the part that defines the allowed values ?
Can you post the part of the data model.php where your new field is defined ?
Hope this helps
Hi dflaven, I figured it out, the piece I was missing to make the field a drop-down list was in the model for the ticket module.
// Lifecycle
MetaModel::Init_DefineState(
"new",
array(
"attribute_inherit" => null,
"attribute_list" => array( 'urgency' => OPT_ATT_MUSTCHANGE,
'priority' => OPT_ATT_READONLY,
'severity' => OPT_ATT_MUSTCHANGE,
),
Changing severity from READ ONLY to MUST CHANGE did the trick! I love this stuff. Thank you for your help….
Ok, great. The meaning of such flags in the life cycle of the object is:
READONLY => Ok, you got it, the field cannot be edited by the end user
MUSTCHANGE => When the ticket enters the specified state, the end-user is prompted to change the value of this field
MUSTPROMPT => When the ticket enters the specified state, the end-user is prompted to check the value… but not forced to change it
If you declare nothing about a field in the life cycle, the field is *just* editable as any other field of the ticket.'
Best regards
How can I add a field which only display information in Incident view? The value of this field will be get from database for display purpose.
Thanks.