The change is not very hard (attached). I used the field description: "Email address of the person who submitted the item (if different from the submitter field, add address to CC list)" - so I did not made the checkbox I mentioned (of course, this is not because such a feature is tedious to implement). If it ok I will commit it.

However, I do have to test whether the user did not fake the form: he could use a custom form to set the originator mail field. I could also set the "assigned to" field using this method. I think we should add this check for all fields when creating the tracker item.

--
Sylvain


Sylvain Beucler wrote:
Mathieu Roy wrote:
Sylvain Beucler <[EMAIL PROTECTED]> tapota :

> When a request is made by an anonymous user, (s)he can give his
> e-mail nonetheless using the 'Originator Email' field. However,
> this e-mail is not notified of updates.
>
> At the moment, I am using the bug tracking system to get reports
> from people who should not have to register, since it is a personal
> installation with 1 project (2 with administration) :)
>
> Is there a particular reason why 'Originator Email' is not
> notified, or should I fix this?

I had this discussion in september at CERN and at that time, we
reached the conclusion not to implement it. I do not remember exactly why. I think it was the first that added this field in the first place but specifically did not want to get it notified, unlike the CC. I did not wrote down exactly if we planned to change that or
whatever. Or maybe it was not implemented just because it was not
needed at that time.

In my opinion, we should not have this field to be used for
notification while this is already implemented via the CC stuff. But
maybe we should automatically add in CC the originator email, when
given.

Someone should take a look at the code and list changes needed to
perform that. If it can be done cleanly, that's probably a good
a good thing to add.

The issue is maybe that an anonymous user cannot edit the CC list.
And it would also not be fine to let anybody add himself to the CC list, since one could add somebody who do not want that.

However, in this particular case, I see no reason why somebody (A) would post a false bug report with someone else (B)'s email. In the worst case, B will receive 2 e-mails, one with the fake report, then another from the admin when he will classify the bug as Invalid, which should not be too annoying - there are easier ways to send anonymous e-mails.

I also assume nobody will send a valid bug report with someone else's e-mail.

So the solution would be to add a check box to know whether the originator wants to be notified, and if yes add him in the CC list, with no way to be removed (except that he can explicitely request it during the bug discussion).

Does it sounds ok?

I'll have a look at the code right now.
Index: index.php
===================================================================
RCS file: /cvs/savane/savane/frontend/php/include/trackers_run/index.php,v
retrieving revision 1.27
diff -r1.27 index.php
122a123,147
> 	    # Originator Email:
> 	    # "Email address of the person who submitted the item
>             # (if different from the submitter field, add address to CC list)"
> 	    # Only apply this behavior if the field is present
> 	    $oe_field_name = "originator_email";
> 	    if  (($is_trackeradmin && trackers_data_is_showed_on_add_members($oe_field_name)) ||
> 		 (!$is_trackeradmin && trackers_data_is_showed_on_add($oe_field_name)) ||
> 		 (!user_isloggedin() && trackers_data_is_showed_on_add_nologin($oe_field_name)) ) 
> 		    {
>                       # cannot be a registered user
> 		      if (validate_email($_POST{$oe_field_name}))
> 			{
> 			  # must be different from the submitter field
> 			  $user=user_getid();
> 			  $submitter_email = db_result(db_query("SELECT email FROM user WHERE user_id=".$user),
> 			    0, 'email');
> 			  if ($_POST{$oe_field_name} != $submitter_email)
> 			    {
> 			      trackers_add_cc($item_id,
> 					      $group_id,
> 					      $_POST{$oe_field_name},
> 					      "Originator Email");
> 			    }
> 			}
> 		    }

Reply via email to