public inbox for gnats-devel@sourceware.org
 help / color / mirror / Atom feed
* Different mail-format or on-change action for particular Category
@ 2005-05-24 20:41 Tim Buck
  2005-05-24 22:32 ` Chad Walstrom
  2005-05-25  0:24 ` Mel Hatzis
  0 siblings, 2 replies; 4+ messages in thread
From: Tim Buck @ 2005-05-24 20:41 UTC (permalink / raw)
  To: help-gnats

Is there any way to have GNATS use a different mail-format or apply
a different on-change action depending on the category of the PR,
or depending on whether or not a PR is marked confidential?

Tim Buck * Information Technology Manager * Recognition Research, Inc.
PHONE +1 540 961-6500 * FAX +1 540 961-3568 * EMAIL tbuck@rrinc.com
Our lives are not determined by what happens to us, but by how we react
to what happens.



_______________________________________________
Help-gnats mailing list
Help-gnats@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnats

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

* Re: Different mail-format or on-change action for particular Category
  2005-05-24 20:41 Different mail-format or on-change action for particular Category Tim Buck
@ 2005-05-24 22:32 ` Chad Walstrom
  2005-05-25  0:24 ` Mel Hatzis
  1 sibling, 0 replies; 4+ messages in thread
From: Chad Walstrom @ 2005-05-24 22:32 UTC (permalink / raw)
  To: help-gnats

Tim Buck <tbuck@rrinc.com>  wrote:
> Is there any way to have GNATS use a different mail-format or apply
> a different on-change action depending on the category of the PR, or
> depending on whether or not a PR is marked confidential?

Not as far as I know, but I'm not the guru here, just the maintainer.
I do think that integrating Guile into GNATS would give us the
expressiveness you need to create custom solutions like this without
further complicating the parsing logic of the dbconfig file.

I would also like to see a directive in dbconfig to specify template
files rather our current solution of having the template as in-line
definitions.

Wishlist items, both, I'm afraid.

I suppose I should file PR's for these. ;-)

-- 
Chad Walstrom <chewie@wookimus.net>           http://www.wookimus.net/
           assert(expired(knowledge)); /* core dump */


_______________________________________________
Help-gnats mailing list
Help-gnats@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnats

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

* Re: Different mail-format or on-change action for particular Category
  2005-05-24 20:41 Different mail-format or on-change action for particular Category Tim Buck
  2005-05-24 22:32 ` Chad Walstrom
@ 2005-05-25  0:24 ` Mel Hatzis
  2005-05-25  1:54   ` Tim Buck
  1 sibling, 1 reply; 4+ messages in thread
From: Mel Hatzis @ 2005-05-25  0:24 UTC (permalink / raw)
  To: Tim Buck; +Cc: help-gnats

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tim Buck wrote:
> Is there any way to have GNATS use a different mail-format or apply
> a different on-change action depending on the category of the PR,
> or depending on whether or not a PR is marked confidential?

Not currently, however I've developed exactly this functionality
for my employer and it's proved to be extremely useful. I was planning
on incorporating this to the official GNATS project over the next month
or two.

The way it works is that each mail-format definition has a
mandatory 'trigger' associated with it (e.g. "on-create",
"on-append", etc). Furthermore, each trigger can be specified with
an optional condition constraining when the trigger is "fired".
So, a mail-format definition in dbconfig looks like:

  #
  # This format is used for initial PRs that end up as pending PRs.
  #
  mail-format "initial-pr-notification-pending" {
    trigger on-create "Category==\"pending\""
    from-address {
        "From:" | "From"
    }
    to-addresses {
        fixed-address "gnats-admin" "Reply-To:" | "From:"
        "Notify-List"
    }
    ...etc
  }

The GNATS code is modified so that rather than sending email
notifications of hardwired mail-format names, it sends email
based on the triggers. You can have multiple mail-formats
defined to trigger "on-create" for example (nominally with
different trigger conditions) and the relevant notifications
will be sent out based on which trigger conditions are applicable
to the state of the PR.

The mail-format names are essentially unused...they have been
retained for potential logging/error reporting.

- --
Mel Hatzis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCk73qNF74HmYqaSERAstTAJ0bVv/9CDUHbk3KQ9wcNysXkqwYiQCgmQQZ
EwcMk5KY29IOSVAt4n8NyPs=
=qQM7
-----END PGP SIGNATURE-----


_______________________________________________
Help-gnats mailing list
Help-gnats@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnats

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

* Re: Different mail-format or on-change action for particular Category
  2005-05-25  0:24 ` Mel Hatzis
@ 2005-05-25  1:54   ` Tim Buck
  0 siblings, 0 replies; 4+ messages in thread
From: Tim Buck @ 2005-05-25  1:54 UTC (permalink / raw)
  To: Mel Hatzis; +Cc: help-gnats


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

On May 24, 2005, at 7:51 PM, Mel Hatzis wrote:

> Not currently, however I've developed exactly this functionality
> for my employer and it's proved to be extremely useful. I was planning
> on incorporating this to the official GNATS project over the next month
> or two.
>
> The way it works is that each mail-format definition has a
> mandatory 'trigger' associated with it (e.g. "on-create",
> "on-append", etc). Furthermore, each trigger can be specified with
> an optional condition constraining when the trigger is "fired".

That does sound extremely useful! I look forward to having this 
functionality. I have a workaround for my particular situation in the 
meantime.

Thanks!

Tim Buck

[-- Attachment #1.2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 1830 bytes --]

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

_______________________________________________
Help-gnats mailing list
Help-gnats@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnats

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

end of thread, other threads:[~2005-05-25  1:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-24 20:41 Different mail-format or on-change action for particular Category Tim Buck
2005-05-24 22:32 ` Chad Walstrom
2005-05-25  0:24 ` Mel Hatzis
2005-05-25  1:54   ` Tim Buck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).