what does this mean "current.caller_id == gs.getUserID() && (current.incident_state.changesTo(6) || current.incident_state.changesTo(7))" ?

gangasatishgurr
Kilo Expert

Please explain the above the code

5 REPLIES 5

Brian Dailey1
Kilo Sage

Hi Ganga,



This has already been answered by others here, but I think a clearer explanation might help you a bit.   Your condition posted above is essentially checking for two things to be true:



  1. Is the logged in user who is making this change [gs.getUserID()] the same person as the Contact who entered in the ticket [current.caller_id] ?
  2. And if so, has the state changed to either Resolved [...changesTo(6)]     or     to Closed [...changesTo(7)]?


Basically it's checking to see if the Contact for an incident is either closing/resolving their own ticket.   I hope that helps you to understand a little better what's going on here.




Thanks,


-Brian