0

2

We're currently using a post-commit hook in SVN that appends commit comments to their respective Fogbugz case, but this causes an E-Mail to get sent to the case owner (who is normally the one doing the commit).

Is it possible to edit a Fogbugz case without sending an E-Mail? Can we disable notifications for actions done by a specific user account? (In this case our SVN Commit user).

Thank you.

flag

3 Answers

3

There is a no "self" notification rule, so if you were logging into the API as the user who was doing the edit, then there would be no notification.

Alternatively, you can edit a case "as another user" provided you are logged into the API as an admin and you pass the ixPersonEditedBy argument. So, essentially, always use an admin login to do the API command, look at the user who is doing the SVN commit and use the corresponding ixPerson to do the case edit. Then not only will it not generate an email, but the history on the case will be accurate.

link|flag
Excellent. I didn't know it was possible to edit a case as someone else. I'll have to give that approach a shot. Thanks! – Matthew Huotari Apr 12 2010 at 18:31
It worked! Thank you very much for your help. – Matthew Huotari Apr 12 2010 at 19:19
I tried this approach as well, and I did find one "hole". If I edit a case and set its ixBugParent argument, the user did not get email notification of the child case being edited, but DID get notification that the parent was edited. – Jeff Smith Jun 30 at 19:36
2

I was not able to find a good way of doing this; I ended up temporarily disabling notification directly in the database when updating some information "behind my user's backs" to fix up some import problems when we started using FB.

It would be really useful if the API cmd=edit command included a flag indicating notification should be suppressed.

link|flag
As I recall, for at least some of the work I had to do, it was necessary to disable notifications for subscribed users as well as for the editors (or FB would have ended up sending scores of e-mails to each subscribed for fairly trivial automatic changes). This introduced the risk of a hole: if someone had submitted a new case while notifications were disabled, none of the subscribers would know about it. That's why I think having a mechanism to suppress notifications is still a good idea. – James McLeod Apr 12 2010 at 19:51
0

Matthew, do you think you could share the code that you are using for your post-commit hook to append the svn commit message to the fogbugz ticket? Interested in doing this as well and would like to see how you implemented it.

-Kevin

link|flag
Hello Kevin, Sorry, I'm not allowed to share the code, but I can tell you its really quite easy. Just add Mechanize (or similar) on your server that runs the post-commit Perl script. Then you can send requests to the Fogbugz API. First do a search to find out who owns the bug, parse the response, and then send an edit command with the commit comments and set the flag to post as the bug owner. Hope that helps! – Matthew Huotari Apr 23 2010 at 17:00
Heres an example of how to make an API call to edit a case in perl: use WWW::Mechanize; my $mech = WWW::Mechanize->new(); $mech->get("$BUGZ_API_URL?cmd=edit&token=$token&ixBug=$ixBug&ixPersonEditedBy=$ixPerson&sEvent=$event"); – Matthew Huotari Apr 23 2010 at 17:19

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.