You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Dawid Weiss <da...@gmail.com> on 2011/01/25 20:14:37 UTC

Threading of JIRA e-mails in gmail?

Hi everyone,

There's a fair bit of info on the internet about this, apparently
gmail groups by subject only and JIRA includes varying content in an
issue's subject, depending on the action (comment, update, etc.). Did
anybody find a solution to thread ALL of an issue's messages into a
single thread (other than hacking through a proxy account and
rewriting message subjects? :)

Dawid

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Threading of JIRA e-mails in gmail?

Posted by Michael McCandless <lu...@mikemccandless.com>.
This is an awful problem!

I made a Python script to workaround this... it's kinda scary: it logs
in (over IMAP), finds the messages, removes the old ones, and puts
back new ones with the "corrected" subject line so that gmail groups
them properly.  If you want I can send the Python script... but it's
pretty scary.  If it has bugs it can delete your emails!  And it
requires you to put your IMAP credentials into a Python source... etc.

I wish there were a cleaner solution :)

Mike

On Tue, Jan 25, 2011 at 2:14 PM, Dawid Weiss <da...@gmail.com> wrote:
> Hi everyone,
>
> There's a fair bit of info on the internet about this, apparently
> gmail groups by subject only and JIRA includes varying content in an
> issue's subject, depending on the action (comment, update, etc.). Did
> anybody find a solution to thread ALL of an issue's messages into a
> single thread (other than hacking through a proxy account and
> rewriting message subjects? :)
>
> Dawid
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Threading of JIRA e-mails in gmail?

Posted by Dawid Weiss <da...@cs.put.poznan.pl>.
> without knowing how this actually happens...  is this something we
> could get installed in the apache infrastructure?  could we filter
> dev@lucene.apache.org, rather then each person?
>
> Does apache run procmail?

Good idea, Ryan! people.apache.org sure does have procmail installed --

[dweiss@minotaur:~]$ which procmail
/usr/local/bin/procmail

.forward is respected, but I didn't experiment with procmail piping;
maybe it would have worked out of the box, who knows.
I believe we could ask Apache infrastructure folks if it'd be all
right to use procmail on @apache e-mail addresses. If so, setting up
JIRA to forward all mail to an @apache account which would then in
turn forward filtered e-mails to the mailing list would be trivial...
but like I said before, this would probably result in 50% of mailing
list members complaining about those missing "Commented, Created,
Closed" fields in the subject, so it should probably remain a per-user
option.

Dawid

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Threading of JIRA e-mails in gmail?

Posted by Ryan McKinley <ry...@gmail.com>.
On Sat, Jan 29, 2011 at 10:04 AM, Dawid Weiss
<da...@cs.put.poznan.pl> wrote:
>>> > I eventually went with procmail (with a little help from guys that
>>> > know it better). So, for folks who do have access to their MTA and can
>>> > filter e-mails, here it is (postfix/procmail combo):
>>
>> From the email address it seems you also had to modify the email address
>> registered to JIRA and/or dev list, right?
>
> Unfortunately yes. You will need to proxy your e-mail through an
> account that has procmail installed.

without knowing how this actually happens...  is this something we
could get installed in the apache infrastructure?  could we filter
dev@lucene.apache.org, rather then each person?

Does apache run procmail?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Threading of JIRA e-mails in gmail?

Posted by Doron Cohen <cd...@gmail.com>.
Thanks for sharing this! - I tested it by sending a few mails and indeed it
works! - GMAIL threads detection seems to ignore the text within the
brackets. I wonder if such a change can be applied per project, or must be
applied for all projects.
Just opened https://issues.apache.org/jira/browse/INFRA-3528 for this - if
you would like such a change please vote for it...

Doron

On Wed, Feb 23, 2011 at 11:00 AM, Dawid Weiss
<da...@cs.put.poznan.pl>wrote:

> I didn't know about this, very interesting. You'd need to contact
> Apache infrastructure folks -- jira is shared among all the projects,
> so I don't think it'll be easy.
>
> Dawid
>
> On Wed, Feb 23, 2011 at 9:46 AM, Israel Tsadok <it...@gmail.com> wrote:
> > I'm not sure if this solution has been suggested, but I just noticed that
> > the gmail threading algorithm ignores the bracketed part of the subject
> > line. (I couldn't find it documented officially, though).
> > That means that if JIRA subject lines can indeed be customized to say
> e.g.
> > "[JIRA - Created:] (LUCENE-XXX) blah" instead of the current "[JIRA]
> > Created: (LUCENE-XXX) blah", the gmail issue would be resolved. I only
> > noticed it because this is exactly how YouTrack handles this.
> > Is this a viable option?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

Re: Threading of JIRA e-mails in gmail?

Posted by Dawid Weiss <da...@cs.put.poznan.pl>.
I didn't know about this, very interesting. You'd need to contact
Apache infrastructure folks -- jira is shared among all the projects,
so I don't think it'll be easy.

Dawid

On Wed, Feb 23, 2011 at 9:46 AM, Israel Tsadok <it...@gmail.com> wrote:
> I'm not sure if this solution has been suggested, but I just noticed that
> the gmail threading algorithm ignores the bracketed part of the subject
> line. (I couldn't find it documented officially, though).
> That means that if JIRA subject lines can indeed be customized to say e.g.
> "[JIRA - Created:] (LUCENE-XXX) blah" instead of the current "[JIRA]
> Created: (LUCENE-XXX) blah", the gmail issue would be resolved. I only
> noticed it because this is exactly how YouTrack handles this.
> Is this a viable option?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Threading of JIRA e-mails in gmail?

Posted by Israel Tsadok <it...@gmail.com>.
I'm not sure if this solution has been suggested, but I just noticed that
the gmail threading algorithm ignores the bracketed part of the subject
line. (I couldn't find it documented officially, though).

That means that if JIRA subject lines can indeed be customized to say e.g.
"[JIRA - Created:] (LUCENE-XXX) blah" instead of the current "[JIRA]
Created: (LUCENE-XXX) blah", the gmail issue would be resolved. I only
noticed it because this is exactly how YouTrack handles this.

Is this a viable option?

Re: Threading of JIRA e-mails in gmail?

Posted by Dawid Weiss <da...@cs.put.poznan.pl>.
Looks like my action prompted a response from infra and it's not
encouraging -- they're supposedly switching off procmail support on
that server soon.

Track INFRA-3403 to see what will come out of this, I don't want to
spam this list. Eh.

Dawid

On Mon, Feb 7, 2011 at 1:14 PM, Doron Cohen <cd...@gmail.com> wrote:
> Thanks Dawid
> It is not working for me yet, looking for the reason for that...
> Doron
>
> On Mon, Feb 7, 2011 at 12:48 PM, Dawid Weiss <da...@cs.put.poznan.pl>
> wrote:
>>
>> Just a follow-up to this one: no reply from infra yet, but I simply
>> tried my config. on people.apache.org and it works like a charm, so
>> for Apache committers and gmail users this is probably a life-saver.
>> My config is described in a comment here:
>>
>> https://issues.apache.org/jira/browse/INFRA-3403
>>
>> Dawid
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: dev-help@lucene.apache.org
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Threading of JIRA e-mails in gmail?

Posted by Doron Cohen <cd...@gmail.com>.
Thanks Dawid
It is not working for me yet, looking for the reason for that...
Doron

On Mon, Feb 7, 2011 at 12:48 PM, Dawid Weiss
<da...@cs.put.poznan.pl>wrote:

> Just a follow-up to this one: no reply from infra yet, but I simply
> tried my config. on people.apache.org and it works like a charm, so
> for Apache committers and gmail users this is probably a life-saver.
> My config is described in a comment here:
>
> https://issues.apache.org/jira/browse/INFRA-3403
>
> Dawid
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

Re: Threading of JIRA e-mails in gmail?

Posted by Dawid Weiss <da...@cs.put.poznan.pl>.
Just a follow-up to this one: no reply from infra yet, but I simply
tried my config. on people.apache.org and it works like a charm, so
for Apache committers and gmail users this is probably a life-saver.
My config is described in a comment here:

https://issues.apache.org/jira/browse/INFRA-3403

Dawid

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Threading of JIRA e-mails in gmail?

Posted by Dawid Weiss <da...@cs.put.poznan.pl>.
I've created a jira request to the infrastructure team, it's here:

https://issues.apache.org/jira/browse/INFRA-3403

Dawid

On Sat, Jan 29, 2011 at 6:26 PM, Michael McCandless
<lu...@mikemccandless.com> wrote:
> On Sat, Jan 29, 2011 at 10:04 AM, Dawid Weiss
> <da...@cs.put.poznan.pl> wrote:
>>>> > I eventually went with procmail (with a little help from guys that
>>>> > know it better). So, for folks who do have access to their MTA and can
>>>> > filter e-mails, here it is (postfix/procmail combo):
>>>
>>> From the email address it seems you also had to modify the email address
>>> registered to JIRA and/or dev list, right?
>>
>> Unfortunately yes. You will need to proxy your e-mail through an
>> account that has procmail installed. I think Mike's solution of
>> accessing your inbox via IMAP and modifying mail in there directly
>> would work with a gmail account, although I don't know how it works (I
>> assume Mike's script is deleting the previous message and inserting a
>> modified copy?).
>
> Yes that's exactly how it works.  Which is sort of scary :)  And it's
> this process you have to keep alive when it crashes, etc. ;)
>
> The procmail piping solution is cleaner... I like it.
>
> Mike
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Threading of JIRA e-mails in gmail?

Posted by Michael McCandless <lu...@mikemccandless.com>.
On Sat, Jan 29, 2011 at 10:04 AM, Dawid Weiss
<da...@cs.put.poznan.pl> wrote:
>>> > I eventually went with procmail (with a little help from guys that
>>> > know it better). So, for folks who do have access to their MTA and can
>>> > filter e-mails, here it is (postfix/procmail combo):
>>
>> From the email address it seems you also had to modify the email address
>> registered to JIRA and/or dev list, right?
>
> Unfortunately yes. You will need to proxy your e-mail through an
> account that has procmail installed. I think Mike's solution of
> accessing your inbox via IMAP and modifying mail in there directly
> would work with a gmail account, although I don't know how it works (I
> assume Mike's script is deleting the previous message and inserting a
> modified copy?).

Yes that's exactly how it works.  Which is sort of scary :)  And it's
this process you have to keep alive when it crashes, etc. ;)

The procmail piping solution is cleaner... I like it.

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Threading of JIRA e-mails in gmail?

Posted by Dawid Weiss <da...@cs.put.poznan.pl>.
>> > I eventually went with procmail (with a little help from guys that
>> > know it better). So, for folks who do have access to their MTA and can
>> > filter e-mails, here it is (postfix/procmail combo):
>
> From the email address it seems you also had to modify the email address
> registered to JIRA and/or dev list, right?

Unfortunately yes. You will need to proxy your e-mail through an
account that has procmail installed. I think Mike's solution of
accessing your inbox via IMAP and modifying mail in there directly
would work with a gmail account, although I don't know how it works (I
assume Mike's script is deleting the previous message and inserting a
modified copy?).

Dawid

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Threading of JIRA e-mails in gmail?

Posted by Doron Cohen <cd...@gmail.com>.
This JIRA/gmail threads thing is driving me crazy too, thanks for sharing!

There are a few discussions of this in atlassian -
http://jira.atlassian.com/browse/JRA-12640 and
http://jira.atlassian.com/browse/JRA-3609 - the latter allowed to customize
the mail subject in JIRA as mentioned above.

I think this is akin to what some other projects do to automatically apply
> patches and validate whether they apply or not.  I've always wanted such a
> system for Lucene, but never had the time to hook it together.  I wish
> Hudson had a JIRA plugin that did it automatically (or maybe there is and
> I'm just not aware of it).
>

Can this really be solved in Hudson? I thought for this one has to get all
JIRA and lucene-dev mails to some other mail server (not gmail) and than
apply this script?


> > I eventually went with procmail (with a little help from guys that
> > know it better). So, for folks who do have access to their MTA and can
> > filter e-mails, here it is (postfix/procmail combo):
>

>From the email address it seems you also had to modify the email address
registered to JIRA and/or dev list, right?

Re: Threading of JIRA e-mails in gmail?

Posted by Grant Ingersoll <gs...@apache.org>.
I think this is akin to what some other projects do to automatically apply patches and validate whether they apply or not.  I've always wanted such a system for Lucene, but never had the time to hook it together.  I wish Hudson had a JIRA plugin that did it automatically (or maybe there is and I'm just not aware of it).

-Grant
On Jan 28, 2011, at 11:51 AM, Dawid Weiss wrote:

> Just a follow-up to those interested...
> 
> I eventually went with procmail (with a little help from guys that
> know it better). So, for folks who do have access to their MTA and can
> filter e-mails, here it is (postfix/procmail combo):
> 
>> cat ~/.forward
> "|/usr/bin/procmail"
> 
>> cat ~/.procmailrc
> 0:
> {
>  :0fhw:
>  | perl -pe 's/^(Subject: \[jira\] )([^\\ ])+(.*)/Subject:$3/g'
> 
>  :0
>  !your-other@internet.address
> }
> 
> That last forward only if you want to redirect somewhere else, of
> course. Works like a charm.
> 
> Dawid
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Threading of JIRA e-mails in gmail?

Posted by Dawid Weiss <da...@cs.put.poznan.pl>.
Just a follow-up to those interested...

I eventually went with procmail (with a little help from guys that
know it better). So, for folks who do have access to their MTA and can
filter e-mails, here it is (postfix/procmail combo):

> cat ~/.forward
"|/usr/bin/procmail"

> cat ~/.procmailrc
0:
{
  :0fhw:
  | perl -pe 's/^(Subject: \[jira\] )([^\\ ])+(.*)/Subject:$3/g'

  :0
  !your-other@internet.address
}

That last forward only if you want to redirect somewhere else, of
course. Works like a charm.

Dawid

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Threading of JIRA e-mails in gmail?

Posted by Dawid Weiss <da...@gmail.com>.
> if you use the gmail web ui however, you're screwed six ways from sunday,
> and messages with differnet subjects are never considered the same thread.

This is exactly what I'm using (gmail via browser) and it hurts like
hell. It'd be so easy if you could simply mute an entire issue from
JIRA you're not interested in instead of laboriously working your way
through every update on every single subject... I guess the fact gmail
is free should make me shut up and silently accept this, but for some
reason I feel bad about this.

Mike, your python script... frightening. I love it ;) I'll check if I
can proxy through another mail server and set up procmail filtering
there. If I don't succeed, I will ask you for that script.

Also, JIRA seems to have customizable subject field now, so
theoretically infra@apache could modify the mail templates as in:
http://confluence.atlassian.com/display/JIRA/Customising+Email+Content
I'm guessing such a change would be loathed by a similar number of
people that would embrace it with love, so this is perhaps not the
right way to go, unfortunately...

Thanks anyway,
Dawid

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Re: Threading of JIRA e-mails in gmail?

Posted by Chris Hostetter <ho...@fucit.org>.
: There's a fair bit of info on the internet about this, apparently
: gmail groups by subject only and JIRA includes varying content in an
: issue's subject, depending on the action (comment, update, etc.). Did
: anybody find a solution to thread ALL of an issue's messages into a
: single thread (other than hacking through a proxy account and
: rewriting message subjects? :)

If i remember correctly from the last time i investigated this, Gmail's 
behavior in dealing with "threads" (why they choose to rename them 
"conversations" is another rant) when you connect via *IMAP* is actually a 
weird hybrid of what they say they do (only treat it as a thread if the 
subject is the same) and what they should do (respect the In-Reply-To and 
References headers)

I'm fairly certain that if a message contains both In-Reply-To and 
References headers, gmail's IMAP server will respond to "sort thread" 
commands by putting both messages in the same "thread", but 
inspite of the RFCs saying that a message with an In-Reply-To header 
but no References header should be treated as if it has a References 
identifying the same message, gmail treats this situation differnetly, and 
does not conside the two messages part of hte same thread.

(Jira emails use In-Reply-To, but not Refrences headers)

if you use the gmail web ui however, you're screwed six ways from sunday, 
and messages with differnet subjects are never considered the same thread.


-Hoss

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org