       	Bugzero Inbound Email Management and CVS/Perforce Integration


Bugzero accepts issue/bug reports submitted through email.


Use cases:
---------

1. Submit updates for multiple existing bugs in one email: 
   (in cases such as source control system integration) 
   Bug # must be given inside the email body in the following format:
   bug: id1, id2, id3  $state
   here, $state is optional, if present, it should be replaced by closed, fixed etc.
   Note that, only Bugzero users or the original submitter can update an existing
   bug.

2. Submit updates for a single existing bug:
   (in cases such as customer replying to email notification from Bugzero)
   Bug # can be given either in the email subject line, or in the email
   body. If one replies to the email notification, the bug # in the link
   (issueId=) will be picked up.

3. Submit a new bug:
   (in cases such as customer sending tech support email request)
   If no bug # is found, or the given bug does not exist, a new bug is created.
   To prevent an email to be saved to the system, you can filter email based
   on mail header Received and From, the Subject, and the email content itself.
   An email filter is applied only to new bug submission if the line starts
   with 'NEWONLY:', otherwise, it applies to both new and update.

In all cases, one can give a value to any field in the email in a format of:
   $field_internal_name$=value

If no value is given to a required field, the default is given to it if the
bug is new. Otherwise, for an existing bug, the field value is not updated.
The email body is always saved in the description/response field.

Any attachment to the email is saved as an attachment as it is.

The field_internal_names include:

   assignable
   synopsis
   category
   severity
   priority
   state
   cc_mail
   field_1 to field_20 if enabled


How to setup:
------------
Bugzero provides two ways to accept incoming emails. The preferred method is to
use the perl script on Linux (see README-linux.txt). On Windows, however, you
need use the build-in mailbox daemon (see README-win.txt).



Steps to setup CVS with Bugzero:
-------------------------------
1. Modify CVSROOT/loginfo to send email to bugzero_project_mailbox@your-mail-server.com
2. When commit changes, add the following line in the message:
   bug: 1,2,3 fixed  <-- bug state (add an empty space after the bug numbers)
3. Since a commit email without a bug number should not be saved into the 
   Bugzero system, you should configure NEWONLY filters to filter out those emails.
4. Note that, the cvs user and from email address must be matched to a Bugzero user.


Steps to setup Subversion with Bugzero:
-------------------------------------
1. cd /path/to/svn-repo/hooks
   cp post-commit.tmpl post-commit
   chmod +x post-commit
2. Modify script post-commit,
   if there is svnnotify, enable it and do
   --subject-prefix (-P) "SVN Commit:"
   --from (-f) "$AUTHOR@your-mail-server.com"
   --to (-t) bugzero_project_mailbox@your-mail-server.com

   or, if there is a line of commit-email.pl, change it to
   commit-email.pl "$REPOS" "$REV"  -s "SVN Commit:" 
   --from "$AUTHOR@your-mail-server.com" bugzero_project_mailbox@your-mail-server.com

3. When commit changes, add the following line in the message:
   bug: 1,2,3 fixed  <-- bug state (add an empty space after the bug numbers)
4. Since a commit email without a bug number should not be saved into the 
   Bugzero system, you should configure NEWONLY filters to filter out those emails.
5. Note that, the svn user and from email address must be matched to a Bugzero user.


Steps to setup Perforce with Bugzero:
------------------------------------
1. On the p4 server, run the Change Review Daemon.
2. Create a new p4 user for each project you want receive email. The user email 
   address should be the project email, bugzero_project_mailbox@your-mail-server.com,
   and the Review should be dir/files of which changes need to be monitered,
   such as //depot/projectx/...
3. When a p4 user commits changes, add the following line in the message:
   bug: 1,2,3 fixed  <-- bug state (add an empty space after the bug numbers)
4. Since any p4 emails without a bug number should not be saved into the 
   Bugzero system, you should configure NEWONLY filters to filter out those emails.


Other Source Control System Integration
---------------------------------------
You may try integrate Bugzero with other version control systems. You need find
out the email trigger your system has and make it send email to
mailbox_projectx@your-mail-server.com, the mailbox or alias that you setup
for incoming emails.   
