I am using comment driven with Notifications module & Token module in issue tracker system. Say there is a CCK field [field_issue_status] will be used in "issue" type & notification mails.
1. status is "open"
2. change it to "fixed" & post a comment
3. received a email, the status is still "open"
4. change it to "closed" & post another comment
5. received a email, the status is "fixed"
So the values in notification mails are always the one before change.

Seems comment driven changes the CCK values after Notifications/Token module read it. Or is there any other reason?

Comments

arhak’s picture

comment is saved first, then node is update,
I guess you're triggering on comment creation

it can't be atomic, both things can't be done at once,
so.. whether it would be more appropriate to save the comment then the node or the other way around? (i.e. the node then the comment)

discussion/thoughts?

PS: if you would like to draft your own patch, start by comment_driven.alter.inc, function _comment_driven_submit (at the end of that file)

arhak’s picture

Project: Driven API » Comment driven
J3’s picture

There are 3 event types of Notifications module:
1. node create
2. node update
3. comment
I tried to send mails for event 2 & 3, and got same results (didn't update). For event 2, i mean, updated by comment driven. (If I updated the node directly, the emails are correct, of course)

I didn't try system events (of trigger/rules modules). Maybe the timing between events of Notifications modules & system events is different, I don't know.

Thanks for your information, I will take a look at comment_driven.alter.inc

givanel’s picture

Hi there. i know this is old, but has anyone reversed the order of the submission (update first, then comment?). Thanks in advance!