Clarify table elements: incident_state vs state; active

tayrez
Giga Contributor

Hello,

What is the difference between incident_state and state on the Incident table?   How are they used (out of box)?   What is their relationship?

Active Field   (not specifically the incident table):   What is it used for?   What sets the switch? Where I can I learn more about it?

Thanks,

Therese

1 ACCEPTED SOLUTION

Hi Therese,



You're welcome!



As for the other question, the active state in the task table is managed primarily by a business rule which is called Task Active State Management. That business rule will set the active state in accordance to whether the state of the task is an "inactive type of state". That definition of an inactive state can be found in the script include TaskStateUtil which specifies the states   3, 4 and 7 as inactive states.



On a similar way, there's a lot of business rules that actually set the active flag to false, but from what i know, OOB there's consistency in setting respective state values that represent an inactive item. (You can see these by searching in business rules and other server/client scripts for where the script field contains .active = false)



In your case, i believe you could have some customizations (or users) that perhaps are directly setting the active flag to false without setting the respective state to an inactive type of state.



I hope this is helpful!



Thanks,


Berny


View solution in original post

15 REPLIES 15

Hello Berny,


I definitely know that the screenshot was of the task table.   I'm trying to figure out why active is set to false when the states are Work in Progress, Pending, etc.


Thanks for your advice on relying on the incident_state.



Therese


Hi Therese,



You're welcome!



As for the other question, the active state in the task table is managed primarily by a business rule which is called Task Active State Management. That business rule will set the active state in accordance to whether the state of the task is an "inactive type of state". That definition of an inactive state can be found in the script include TaskStateUtil which specifies the states   3, 4 and 7 as inactive states.



On a similar way, there's a lot of business rules that actually set the active flag to false, but from what i know, OOB there's consistency in setting respective state values that represent an inactive item. (You can see these by searching in business rules and other server/client scripts for where the script field contains .active = false)



In your case, i believe you could have some customizations (or users) that perhaps are directly setting the active flag to false without setting the respective state to an inactive type of state.



I hope this is helpful!



Thanks,


Berny


Hi,


This really helps. Thank you!


Hi Therese Noonan can we close this thread by marking a response as correct?



Thanks,


Berny


Abbas7
Tera Contributor

Hi Therese


Actually Incident table is extended from the task table, so all the fields(columns) which are on task will also be available in the incident table.


Note :When a table is extended from other table then it will get all the properties of that table.


here Incident is extended from task, Hence it will have all the properties of task.



Now your question:


1.What is the difference between incident_state and state on the Incident table?   How are they used (out of box)?   What is their relationship?



Ans: The field incident_state belongs to incident table where as state belongs to task table,


incident_state can only be used in incident table and state can be used in both task and incident tables. The relationship between incident_state and state is child to parent relationship.



2.Active Field   (not specifically the incident table):   What is it used for?   What sets the switch? Where I can I learn more about it?




Ans: Active field is a Boolean (True / false) field   used to show whether a incident or task is being in closed or active state.


if the ticket state is not resolved or closed then Active is True.


if the ticket state is   resolved or closed then Active is False.



You can learn more about it in ITIL process under Incident management.



If you want to see the tables Incident or Task and there relationship


then just type table in service now navigator. System Definition>>Tables


then just search for incident table and see Extends table field, you can find Task



theresa.png