I modified Issues\IssueDetails.aspx to look as follows:
bool SaveIssue()
{
Issue newIssue = new Issue(IssueId, ProjectId, txtTitle.Text, dropCats.SelectedValue, dropMilestone.SelectedValue, dropPriority.SelectedValue, dropStatus.SelectedValue, dropAssigned.SelectedValue, dropOwned.SelectedValue, User.Identity.Name);
if (!newIssue.Save())
{
lblError.Text = "Could not save issue";
return false;
}
IssueId = newIssue.Id;
if (!CustomField.SaveCustomFieldValues(IssueId, ctlCustomFields.Values) )
{
lblError.Text = "Could not save issue custom fields";
return false;
}
newIssue = Issue.GetIssueById( IssueId );
IssueNotification notifyAssigned = new IssueNotification(IssueId, newIssue.AssignedDisplayName);
IssueNotification notifyCreator = new IssueNotification(IssueId, newIssue.CreatorUsername);
notifyAssigned.Save();
IssueNotification.SendIssueNotifications( IssueId ); //Send a notification to the assigned user, but not to the creator.
notifyAssigned.Save();
return true;
}
In my estimation, the correct behaviour is as follows:
- Bug is created, whomever it's assigned to will get an e-mail, and be added to the notification list (and possibly whomever it's owned by).
- The creator is added to the notification list, but they don't get an e-mail when the issue is created (they just created it, they don't need a notification e-mail).
- If a user no longer wants to be notified of changes, they simply take themselves off the notification list.