Modify

Opened 8 years ago

Closed 23 months ago

Last modified 23 months ago

#4720 closed enhancement (wontfix)

Special state if owner is the reporting user (PATCH)

Reported by: hju Owned by: Stephen Hansen
Priority: normal Component: TicketCreationStatusPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Very nice plugin working fine.

I have added a feature handling a new ticket where the reporting user is the owner.

I was in need of sperating two cases to reduce handling "own" tickets

  • there is any owner not me: state will be assigned
  • I am the owner of the new ticket: state will be accepted

Therefore an new option is added

[ticketcreationstatus]
owned_by_user = accepted

which has the highest priority.

  • plugin.py

     
    1111    owned_status = Option('ticketcreationstatus', 'owned', None,
    1212        doc="""Determines the status for tickets that start out owned.""")
    1313
     14    owned_by_user_status = Option('ticketcreationstatus', 'owned_by_user', None,
     15        doc="""Determines the status for tickets that start out owned by user.""")
     16
     17    # ITicketChangeListener methods
     18
    1419    def ticket_created(self, ticket):
    1520        status = None
    16         if self.owned_status:     
     21        if self.owned_by_user_status:
     22            if ticket['owner'] == ticket['reporter']:
     23                status = self.owned_by_user_status
     24
     25        if not status and self.owned_status:     
    1726            if ticket['owner']:
    1827                status = self.owned_status

Attachments (1)

plugin.py.patch (807 bytes) - added by hju 8 years ago.
additional option owned_by_user

Download all attachments as: .zip

Change History (2)

Changed 8 years ago by hju

Attachment: plugin.py.patch added

additional option owned_by_user

comment:1 Changed 23 months ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

Plugin is deprecated. The upcoming Trac 1.2 has equivalent functionality. See the TicketCreationStatusPlugin page for more info.

See also comment:2:ticket:3623. Consider having both create_and_assign and create_and_accept actions.

Last edited 23 months ago by Ryan J Ollos (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Stephen Hansen.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.