BMO/ComponentWatch: Difference between revisions

From MozillaWiki
< BMO
Jump to navigation Jump to search
No edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 5: Line 5:
== schema  ==
== schema  ==


*table '''bmo_watch''' (user_id, product_id, component_id)
*table '''component_watch''' (user_id, product_id, component_id)


== preferences  ==
== preferences  ==


*add a hook to the end of '''account/prefs/email.html.tmpl''' or add a component/product watching tab using the existing hook
*add a hook to the end of '''account/prefs/email.html.tmpl''' or add a component/product watching tab using the existing hook
*add a select for selecting multiple products and/or components  
*add a select for selecting multiple products and/or components
*either use a real select (as per the search ui), or an iframed list of checkboxes to mimic listbox+checkbox
*allow users to watch individual components, or entire products


== code  ==
== code  ==
Line 17: Line 17:
*hook '''bugmail_recipients'''  
*hook '''bugmail_recipients'''  
*simple join to bring in watchers, update '''recipients''' hash
*simple join to bring in watchers, update '''recipients''' hash
== issues ==
*need to send notification when a bug changes ''from'' a watched component/product
*ensure users can't continue to watch items when their access is revoked
*bugmail needs to be extended to support a new relationship type (component/product watching)
== ui sketch ==
  Product  [ product name |v]
  Component [ __any__      |v]
  ( Add )
 
  You are currently watching:
  Select an item to stop watching it.
 
      Product        Component
  [ ] product name    __any__
  [ ] another prod    some component
 
  ( Submit Changes )
need to support non-javascript, so always validate the product & component match.

Latest revision as of 02:20, 11 February 2011

component watching

a non-generic implementation, as an extension, would involve:

schema

  • table component_watch (user_id, product_id, component_id)

preferences

  • add a hook to the end of account/prefs/email.html.tmpl or add a component/product watching tab using the existing hook
  • add a select for selecting multiple products and/or components
  • allow users to watch individual components, or entire products

code

  • hook bugmail_recipients
  • simple join to bring in watchers, update recipients hash

issues

  • need to send notification when a bug changes from a watched component/product
  • ensure users can't continue to watch items when their access is revoked
  • bugmail needs to be extended to support a new relationship type (component/product watching)

ui sketch

 Product   [ product name |v]
 Component [ __any__      |v]
 ( Add )
 
 You are currently watching:
 Select an item to stop watching it.
 
     Product         Component
 [ ] product name    __any__
 [ ] another prod    some component

 
 ( Submit Changes )

need to support non-javascript, so always validate the product & component match.