Here's what i meant to do:
User A fill in details for User B
User A choose user B from group of users
User A close the case but the ownership of the said case changes to User B
User B name will be displayed as the case owner when searching for the said case
The trigger runs well using code below:
Code: Select all
$casenumber = @@APP_NUMBER;
$currentUser = @@USER_LOGGED;
$taskUID = @@TASK;
$newpic = @@NEWPIC;
$query = "SELECT * FROM APP_DELEGATION
WHERE USR_UID = '$currentUser'
AND DEL_THREAD_STATUS = 'OPEN'
AND APP_NUMBER = '$casenumber'
AND TAS_UID = '$taskUID'";
$case = executeQuery($query);
$c = new Cases();
$c->reassignCase($case['APP_UID'], $case['DEL_INDEX'], $case['USR_UID'], $newpic);
The problem now that there's some case that already closed but did not change the case owner.
So now I'm trying to change the CLOSED case to the User B.
If there's no other way, could you recommend which table i need to take a look to change it manually?
Thanks in advance.