[wp-meta] [Making WordPress.org] #762: Themes trac: Magic button to automatically assign reviewers the next available ticket (theme) to review if they don't already have a ticket

Making WordPress.org noreply at wordpress.org
Sat Dec 6 20:36:52 UTC 2014


#762: Themes trac: Magic button to automatically assign reviewers the next
available ticket (theme) to review if they don't already have a ticket
---------------------------+----------------------
  Reporter:  samuelsidler  |      Owner:  al_the_x
      Type:  enhancement   |     Status:  assigned
  Priority:  high          |  Component:  Trac
Resolution:                |   Keywords:
---------------------------+----------------------

Comment (by al_the_x):

 Some sample code from
 [http://trac.edgewall.org/wiki/TracDev/DatabaseApi#Trac1.0API the Database
 API for Trac 1.x] page for reference:

 {{{
 from trac.env import open_environment
 def myFunc():
     env = open_environment() ## omitting the path uses $ENV[TRAC_ENV]
     with env.db_transaction as db:
         cursor = db.cursor()
         # Execute some SQL statements
 }}}

 Workflow:

 * return failure if find `ticket.id` assigned to authenticated user
 * fetch `ticket.id`:
   * `owner` is none
   * join `ticket_enum` on `type` to select "open"?
   * order by `time`
   * limit 1
 * use `trac.ticket.model.Ticket` to update the `owner` field to the
 authenticated user

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/762#comment:3>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list