Unfortunately, I get the following error when I try to test my new state:
2011-10-11 21:01:11 | Error | Invalid state '' for class 'NormalChange', expecting a value in {new, validated, rejected, assigned, plannedscheduled, approved, notapproved, implemented, monitored, closed, my_new_state}
If I'm reading this right, it's trying to pass in an empty string as the 'status' value, which isn't allowed. What modification am I missing to make this work?
I've also tried a setup where "my_new_state" tries to mimic the behavior of the "rejected" state, but get the same error.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Did you apply the changes in the database structure as well ?
The "state" attribute is defined as an enum in MySQL and therefore its definition must be modified.
I'm trying to modify the change management process but have hit some snags. For now, I'm just trying to add the state "my_new_state".
First, I added the string "my_new_state" to the enum listing in the database's change.status field.
Next, I added the following code to the Change class in the model.itop-change-mgmt.php file:
Next, in the same class, I add a definition for an event:
For testing, I just want to make sure things work by going from the states new -> my_new_state -> end. I add the following to the NormalChange class:
Unfortunately, I get the following error when I try to test my new state:
2011-10-11 21:01:11 | Error | Invalid state '' for class 'NormalChange', expecting a value in {new, validated, rejected, assigned, plannedscheduled, approved, notapproved, implemented, monitored, closed, my_new_state}
If I'm reading this right, it's trying to pass in an empty string as the 'status' value, which isn't allowed. What modification am I missing to make this work?
I've also tried a setup where "my_new_state" tries to mimic the behavior of the "rejected" state, but get the same error.
Hello,
Did you apply the changes in the database structure as well ?
The "state" attribute is defined as an enum in MySQL and therefore its definition must be modified.
You can either:
- Run the setup again, by removing the read-only flag on the file config-itop.php and point your browser to http://<your_itop>/setup
- Or let the "Toolkit" to apply the changes for you https://sourceforge.net/apps/mediawiki/itop/index.php?title=Toolkit_for_modifying_the_data_model
Hope this helps,
- Denis
First thing I did was change the database structure. In the change table is a status enum, where I added "my_new_state".
ENUM('approved','assigned','closed','my_new_state','implemented','monitored','new','notapproved','plannedscheduled','rejected','validated')
While we're on the subject, I forgot to mention that I also changed the line about the status field in the metamodel of the Change class.
I figured it out. There's a typo in the transition definition. "target start" should be "target_state" and "target state" should be "target_state"
hi i am new to this will you please help on how to add new value to status field in change mgmt process