Provide token for flag note

rhache - August 14, 2009 - 12:54
Project:Flag Note
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:gunzip
Status:closed
Description

It would be really nice if a token existed for flag note, especially for use with rules.

Sincerely,
Rene

#1

gunzip - August 14, 2009 - 12:59
Assigned to:Anonymous» gunzip
Status:active» needs work

interesting, i will look at this.

#2

rhache - August 17, 2009 - 15:27

gunzip,

Just to give you a bit more info as why I want this, I think would be cool to be able to create a rule that sends an email to to someone whenever a flag note is created.

That way, you could have an "Ask a Question" flag, and specific users could be notified immediately.

I've tried using the tokenSTARTER module, but so far I've had no luck given my pretty rudimentary php coding skills.

Sincerely,
Rene

#3

rgeorgy - October 8, 2009 - 11:12

+1

#4

gunzip - October 28, 2009 - 23:48

can you please make an example use case ? thank you.

#5

gunzip - November 3, 2009 - 00:11
Status:needs work» postponed (maintainer needs more info)

#6

rgeorgy - November 6, 2009 - 21:42

an example use case is when I want to fire a "send a tokenised email" action, that sends the note to the recipient email once an item is flagged.

#7

gunzip - November 7, 2009 - 12:59

do you mean, you want to manually type tokens into the flag note like [node-title] etc ?

#8

rgeorgy - November 8, 2009 - 17:23

I just want to include the flag note into action's email body, something like [flag:note]

#9

rhache - November 15, 2009 - 13:37

Just to expand on rgeorgy explanation, the reason I made the feature request is so that once a flag note was added to a node, that I could inform users of that note via email or some other method.

For example, you could use Flag Notes to track issues on nodes, and immediately notify all users of a particular role a what needs to be fixed.

Thanks,
Rene

#10

gunzip - November 16, 2009 - 23:21
Status:postponed (maintainer needs more info)» needs review

committed to -dev. now there's a [flag-note] token in the "sending tokenized email" flag action. can you confirm that this works well ?

#11

rhache - November 17, 2009 - 13:52

Hi gunzip,

I tested with Rules, since that's the scenario I'm interested in.

However, I cannot see [flag-note] as one of the token items I can use.

I should point out that I'm not familiar with how to use actions with core, for which this might work fine.

Sincerely,
Rene

#12

gunzip - November 17, 2009 - 19:03

sorry there was a small typo, in line 454 you have to put:

if ($type == 'flag')

instead of

if ($type == 'flag-action')

(committed to dev).

Can you try then? Thank you.

#13

BillyMG - November 18, 2009 - 01:28

Seems to work so far, for me. Thanks.

#14

gunzip - November 19, 2009 - 00:15
Status:needs review» fixed

#15

rhache - November 21, 2009 - 21:32

Hi gunzip,

Just tested it and confirming that this does also work for me.

Very very sweet.

Thanks,
Rene

#16

System Message - December 5, 2009 - 21:40
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.