When the CT mail module sends an e-mail after posting an comment, the e-mail contains the case_status_id, assign_to, priortity and so on, from before the comment save.

I made a little trace by inserting
dvm($node->case_status_id, 'name_of_the_node_hook:'.$op);
in the node_hooks and
dvm(case->case_status_id, 'casetracker_mail_send');
in the casetracker_mail_send function.

And then you see that the email is send before the data is updated in the node:

casetracker_nodeapi:load => NULL
casetracker_mail_nodeapi:load => NULL
casetracker_nodeapi:view => string(1) "6"
casetracker_nodeapi:load => NULL
casetracker_mail_nodeapi:load => NULL
casetracker_mail_nodeapi:view => string(1) "6"
casetracker_nodeapi:alter => string(1) "6"
casetracker_mail_nodeapi:alter => string(1) "6"
casetracker_mail_send => string(1) "6" <-- mail is send
casetracker_nodeapi:load => NULL
casetracker_mail_nodeapi:load => NULL
casetracker_nodeapi:view => string(1) "7" <-- this is the, by comment, new status
casetracker_nodeapi:load => NULL
casetracker_mail_nodeapi:load => NULL
casetracker_mail_nodeapi:view => string(1) "7"
casetracker_nodeapi:alter => string(1) "7"
casetracker_mail_nodeapi:alter => string(1) "7"
casetracker_nodeapi:load => NULL
casetracker_mail_nodeapi:load => NULL

Comments

zero2one’s picture

Assigned: Unassigned » zero2one
Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.