The CreatorCon Call for Content is officially open! Get started here.

my incident tickets: when ever we will "cancelled" the Incident ticket "active is false "by default But I am facing the cancelled Incidents also active is true.so can any one provide the code for cancelled tickets i have to set false .

padhu1
Kilo Expert

Hi friends,

my incident tickets: when ever we will "cancelled" the Incident ticket "active is false "by default   But I am facing the cancelled Incidents also active is true.so can any one provide the code for cancelled tickets i have to set active is   false .

is it clear?if not please comment the same.

Thanks in Advance.

13 REPLIES 13

Sujala's answer is perfect to to make inactive for existing incidents and making future incidents inactive.



Thanks,


Sunil Safare


hi sujala thank you so much for your clear explanation


                              I am running your backround script and BR but i am getting this message while running background script:


[Domain Paths] Query against table sys_script restricted by domain values [Accenture[c90a2b444a3623120064ed56263be407], Standard[bcaaa4ab374431008ac465e2b3990e5d], TOP[774190f01f1310005a3637b8ec8b70ef], global]


*** Script: not restricted


[Domain Paths] Query against table incident restricted by domain values [Accenture[c90a2b444a3623120064ed56263be407], global]


*** Script: 100


[Domain Paths] Query against table wf_context restricted by domain values [Accenture[c90a2b444a3623120064ed56263be407], global]


[Domain Paths] Query against table sysapproval_approver restricted by domain values [Accenture[c90a2b444a3623120064ed56263be407], global]


[Domain Paths] Query against table sysrule_approvals restricted by domain values [Accenture[c90a2b444a3623120064ed56263be407], Standard[bcaaa4ab374431008ac465e2b3990e5d], TOP[774190f01f1310005a3637b8ec8b70ef], global]


[Domain Paths] Query against table sys_script restricted by domain values [Accenture[c90a2b444a3623120064ed56263be407], Standard[bcaaa4ab374431008ac465e2b3990e5d], TOP[774190f01f1310005a3637b8ec8b70ef], global]


[Domain Paths] Query against table incident restricted by domain values [Accenture[c90a2b444a3623120064ed56263be407], global]


[Domain Paths] Query against table task_sla restricted by domain values [Accenture[c90a2b444a3623120064ed56263be407], global]


[Domain Paths] Query against table contract_sla restricted by domain values [Accenture[c90a2b444a3623120064ed56263be407], Standard[bcaaa4ab374431008ac465e2b3990e5d], TOP[774190f01f1310005a3637b8ec8b70ef], global]


*** Script [TaskSLAController]: 2017-03-17 03:10:59.137 [DEBUG] _processNewSLAs_criticalSection:


Field values for incident INC0187711:


{"active":"1","approval":"not requested","assigned_to":"7cf287560fc24a0035fde478b1050ee4","assignment_group":"63ffc8940f0d1e00af48abf8b1050ed4","caller_id":"22686a560f424a0035fde478b1050ec8","child_incidents":"0","closed_at":"2016-05-25 03:25:43","closed_by":"7cf287560fc24a0035fde478b1050ee4","cmdb_ci":"1b3e251013ae1600daed36666144b073","company":"c04a66e837a47100c9b465e2b3990efd","contact_type":"phone","description":"Node was not converted back to correct VLAN\r\n=================================\r\nError description and Screenshot: N/A\r\n=================================\r\nTroubleshooting performed:\r\n\r\n-jace.a.g.beltran called to report that his colleague's node was not converted back to its Project VLAN.\r\n-Checked user's node on NCT Tool. VLAN ID is MDT_2nd_Global1_510.\r\n-User's node is 14P-299 .\r\n-jace.a.g.beltran informed that his colleague's was recently rebuild. Ticket: MEL0654365.\r\n\r\n\r\nEnterprise ID: trixie.v.g.oliveros\r\nShift Schedule: 2pm-12am\r\nProject Name: Sparq Solutions\r\nLocation/Cubicle No.: G1/14.46A\r\nContact No.: 53281\r\n=================================\r\nIf taken assistance from Referral: Bianca\r\n================================= \r\n","escalation":"0","impact":"3","incident_state":"8","knowledge":"0","location":"5b01d1330fe112c0af48abf8b1050e71","made_sla":"0","notify":"1","number":"INC0187711","opened_at":"2016-04-04 08:15:53","opened_by":"7cf287560fc24a0035fde478b1050ee4","priority":"3","reassignment_count":"1","reopen_count":"0","resolved_at":"2016-05-25 03:25:43","severity":"3","short_description":"Node was not converted back to correct VLAN","state":"8","sys_class_name":"incident","sys_created_by":"danica.tubalado","sys_created_on":"2016-04-04 08:32:09","sys_domain":"c90a2b444a3623120064ed56263be407","sys_domain_path":"!!!/!!!/!!!/","sys_id":"3ffd91c613ae56005571d4a76144b0f0","sys_mod_count":"9","sys_updated_by":"kambham.muthyalamma.admin","sys_updated_on":"2017-03-17 10:10:58","task_for":"22686a560f424a0035fde478b1050ec8","u_admin_request":"0","u_categorization":"a88da0140f4d1e00af48abf8b1050eaa","u_closed_on_initial":"0","u_code_change_required":"0","u_major_incident":"0","u_override_sla":"0","u_owner_group":"63ffc8940f0d1e00af48abf8b1050ed4","u_project":"7e9263080fc91e00af48abf8b1050e0e","u_push_to_akn":"0","u_reference":"INC0187711","u_reported_date":"2016-04-04 08:32:09","u_requester":"22686a560f424a0035fde478b1050ec8","u_response_date":"2016-05-25 03:25:41","u_shipping":"0","upon_approval":"proceed","upon_reject":"cancel","urgency":"3"}


*** Script [TaskSLAController]: 2017-03-17 03:10:59.143 _newSLACondition: using SLAConditionBase


*** Script [SLAConditionBase]: 2017-03-17 03:10:59.144 [DEBUG] _conditionMatches: [priority=4^active=true^state=1^assignment_group.parent!=67f682561387ee001b2730128144b03f^assignment_group.parent!=23f682561387ee001b2730128144b047^assignment_group.parent!=6ff682561387ee001b2730128144b03a^assignment_group.nameNOT LIKEAPPSUP-A&P^assignment_group.nameNOT LIKEAPPSUP-AandP^EQ] on INC0187711 [3ffd91c613ae56005571d4a76144b0f0] => false


*** Script [TaskSLAController]: 2017-03-17 03:10:59.145 [DEBUG] _checkNewSLA: checking ACN P4 Response, start condition matched=false


[Domain Paths] Query against table sys_user_group restricted by domain values [Accenture[c90a2b444a3623120064ed56263be407], global]


*** Script [TaskSLAController]: 2017-03-17 03:10:59.148 _newSLACondition: using SLAConditionBase


*** Script [SLAConditionBase]: 2017-03-17 03:10:59.149 [DEBUG] _conditionMatches: [priority=3^assignment_group.parent!=67f682561387ee001b2730128144b03f^assignment_group.parent!=23f682561387ee001b2730128144b047^assignment_group.parent!=6ff682561387ee001b2730128144b03a^assignment_group.nameNOT LIKEAPPSUP-A&P^assignment_group.nameNOT LIKEAPPSUP-AandP^EQ] on INC0187711 [3ffd91c613ae56005571d4a76144b0f0] => true


*** Script [SLAConditionBase]: 2017-03-17 03:10:59.150 [DEBUG] _conditionMatches: [stateIN7,8^ORpriority!=3^EQ] on INC0187711 [3ffd91c613ae56005571d4a76144b0f0] => true


*** Script [TaskSLAController]: 2017-03-17 03:10:59.150 [DEBUG] _checkNewSLA: checking ACN P3 Resolution, start condition matched=false


*** Script [TaskSLAController]: 2017-03-17 03:10:59.152 _newSLACondition: using SLAConditionBase


*** Script [SLAConditionBase]: 2017-03-17 03:10:59.153 [DEBUG] _conditionMatches: [priority=1^active=true^state=1^EQ] on INC0187711 [3ffd91c613ae56005571d4a76144b0f0] => false


*** Script [TaskSLAController]: 2017-03-17 03:10:59.153 [DEBUG] _checkNewSLA: checking ACN P1 Response, start condition matched=false


*** Script [TaskSLAController]: 2017-03-17 03:10:59.155 _newSLACondition: using SLAConditionBase



and existing cancelled incidents not getting updated to active false.please assist the same.i don't know what it mean error?


sujalavemula
Kilo Guru

Are you working on MSP instance ? and which release you are working on ?


hi sujala ,


                                    i am not using MSP instance.jusy i added this line of code before updating "gr.setWorkflow(false); " it is working fine.



thanks you very much for your help.