Opened 12 years ago

Closed 12 years ago

#254 closed enhancement (wontfix)

Option to restrict updates by reporter

Reported by: kofal002@… Owned by: bas
Priority: major Milestone:
Component: email2trac Version: 2.1.0
Keywords: Cc:


This ticket is closely related to #253.

When using Email2Trac to handle incoming customer email, it would be nice to have the script only update tickets sent from the reporter. This option would obviously remove the capability for developers to update tickets via email (and thus this option should be disabled by default), but would be excellent for customer support, where the reporter is the only external client who should ever update a ticket.

Something like restrict_update_to_reporter. With the option enabled, if no tickets are found with the same subject/ticket# AND same reporter/sender, then create new ticket.

Attachments (0)

Change History (7)

comment:1 Changed 12 years ago by bas

  • Status changed from new to assigned

What your describe is restrict_update_to_reporter. what is missing in this feature. Developers can also update the tickets via email. You have to adjust the trac permissions,

Another nice feature is you can setup multiple email address with different options that use the same trac project

comment:2 Changed 12 years ago by kofal002@…

I apologize; I'm not entirely sure what you mean by your comment. I don't think this has anything to do with trac permissions; maybe I should be clearer. Critical line from the ticket: "With the option enabled, if no tickets are found with the same subject/ticket# AND same reporter/sender, then create new ticket."

That is, modify the function that checks if it should update or create a ticket to optionally only consider a ticket a valid update if the current email's sender is the same as the ticket's original reporter.

Specifically, it looks like the ticket_update_by_subject function would need to be updated. Currently, it appears to search by summary SQL:

sql = """SELECT id FROM ticket
                WHERE changetime >= %s AND summary LIKE %s
                ORDER BY changetime DESC"""
cursor.execute(sql, [lookback, summary.strip()]

I added this feature (without a configuration option) by adding self.email_addr as a reporter parameter to ticket_update_by_subject and modifying the SQL query:

sql = """SELECT id FROM ticket
                WHERE changetime >= %s AND summary LIKE %s AND reporter LIKE %s
                ORDER BY id DESC"""
cursor.execute(sql, [lookback, summary.strip(), reporter])

This will make an email always trigger an update on the highest-id ticket that matches the subject line AND reporter.

comment:3 Changed 12 years ago by bas

  • Milestone set to New email2trac release 2.X.X

Know i understand what you want. I was confused there is also an email2trac permission setting:

But this has to do with ticket subject matching. I will make an option for it and thanks for the pseudo code. Is ticket #253 a duplicate of this one? Just to be sure

comment:4 Changed 12 years ago by kofal002@…

#253 is related but not the same. I thought that creating two tickets was a good idea since they are two separate issues.

#253 is about avoiding confusion if you have two tickets that are named the same (if there is no ticket number in the subject line), by trying to choose the ticket that is most likely relevant. Currently, the first ticket with the same name is chosen, which may not always be correct.

#254 is about optionally restricting updates to the original reporter. This removes the need for #253, but some people may not want to use this option so #253 would still be helpful for people who want to let any author update a ticket.

comment:5 Changed 12 years ago by bas

Thanks for the clarification. #253 is an enhancement of the current behavior ad matched the best result.

For #254 you may set the trac permssion model to:

  • update_restricted_to_participants

see It exactly what you want onlt restrict update to participants. You must remove anoymous for ticket_append permissions. Or are the customers allowed to modify tickets via the web?

comment:6 Changed 12 years ago by kofal002@…

Oh, I did not see the update_restricted_to_participants option.
This issue can be marked as fixed then, since #254 would work perfectly for that.

comment:7 Changed 12 years ago by bas

  • Milestone New email2trac release 2.X.X deleted
  • Resolution set to wontfix
  • Status changed from assigned to closed

Add Comment

Modify Ticket

Change Properties
as closed The owner will remain bas.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.