Modify ↓
#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
11 11 owned_status = Option('ticketcreationstatus', 'owned', None, 12 12 doc="""Determines the status for tickets that start out owned.""") 13 13 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 14 19 def ticket_created(self, ticket): 15 20 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: 17 26 if ticket['owner']: 18 27 status = self.owned_status
Attachments (1)
Change History (2)
Changed 16 years ago by
Attachment: | plugin.py.patch added |
---|
comment:1 Changed 9 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
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.
Note: See
TracTickets for help on using
tickets.
additional option owned_by_user