Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] before-add-message hook no creating threads
@ 2010-03-11 15:47 Daren Lord
  2010-03-14  8:54 ` Tero Tilus
  0 siblings, 1 reply; 2+ messages in thread
From: Daren Lord @ 2010-03-11 15:47 UTC (permalink / raw)
  To: sup-talk


[-- Attachment #1.1: Type: text/plain, Size: 657 bytes --]

All,

Have been using sup for a couple months and now that I feel comfortable with it I want to start customizing it.

I am trying to take certain emails and lump them into a thread so I can keep track of the history

Here is the code from my before-add-message.rb hook:

if message.subj =~ /^\[ENV (PROD|TEST|DEV)\] Hourly ADDM report for instance (.*)/
    message.add_ref $1 + "ADDM REPORTS - " + $2
    message.add_label "report"
    message.add_label $1
end

My add_label statements are working great, I just can't get the add_ref to work. I am not familiar with ruby at all, so I am hoping I am just missing something simple.

Thanks.

DLord



      

[-- Attachment #1.2: Type: text/html, Size: 955 bytes --]

[-- Attachment #2: Type: text/plain, Size: 140 bytes --]

_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [sup-talk] before-add-message hook no creating threads
  2010-03-11 15:47 [sup-talk] before-add-message hook no creating threads Daren Lord
@ 2010-03-14  8:54 ` Tero Tilus
  0 siblings, 0 replies; 2+ messages in thread
From: Tero Tilus @ 2010-03-14  8:54 UTC (permalink / raw)
  To: sup-talk

Daren Lord, 2010-03-11 17:47:
> I am trying to take certain emails and lump them into a thread so I
> can keep track of the history

Why not use labels?  That is exactly what labels are for.  Isn't it?

> Here is the code from my before-add-message.rb hook:
> 
> if message.subj =~ /^\[ENV (PROD|TEST|DEV)\] Hourly ADDM report for instance (.*)/
>     message.add_ref $1 + "ADDM REPORTS - " + $2

Sup expects ref to be a message id.  In principle that should work,
but the expectation could bite you here.  Have you tried using id from
an existing message?

>     message.add_label "report"
>     message.add_label $1
> end

-- 
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-14  8:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-11 15:47 [sup-talk] before-add-message hook no creating threads Daren Lord
2010-03-14  8:54 ` Tero Tilus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox