mysql - How to handle Application Subscriptions for Project and Project Tasks which can overlap each other? -


i building project management application php, javascript, , mysql . here notes related question how implement subscription model users subscribe updates when project , project task record modified.

some notes:

  • worth mentioning github issues allow subscribe project , on per issue basis similar model trying except issues project tasks.
  • project subscriptions , project task subscriptions have separate database tables. not sure yet on best route go...

what subscription is:

  • a subscription database record user , project or project task id.
  • when project or project task record modified in way, , alert notice or email sent users subscribed (have record in subscription db table match users id).
  • when subscribe project, subscription notices project record if subscribed child task records belong project.

methods user can subscribe project record receive updates , child task records

  1. a user auto-subscribed project record if create project record in case author/owner.
  2. a user auto-subscribed project record if assigned project record.
  3. a user clicks on subscribe button on project page. can click **unsubscribe button* shown if subscribed project.
    enter image description here enter image description here

methods user can subscribe project task record receive updates it

  1. a user auto-subscribed project record if create project record in case author/owner.
  2. a user auto-subscribed project record if assigned project record.
  3. a user clicks on subscribe button on project task modal. can click **unsubscribe button* shown if subscribed project task. enter image description here enter image description here

some issues consider in how subscription system should work:

  1. when subscribed project makes subscribed it;s child tak records well. viewing project show unsubscribe button. when viewing child taks record, it;s "subscribe" button should disabled or show typical "unsubscribe" since default subscribed through parent project. however, subscribing parent project not create individual subscription records in db each child task don't think idea. consider when new task created after subscribed. number of records huge in route.

  2. consider subscribed task record , later subscribe parent project. project makes subscribed child task records had gotten db record 1 of task records per-task basis subscription. assume project subscription over-ride task subscription record , if later un-subscribe project, still remain subscribed 1 task record. unsubscription project auto delete existing task subscriptions think about.

  3. when subscribed project, don't see anyway unsubscribe on per task basis. should require user unsubscribe project enable per-task subscriptions if want not receive notices on task in project?


i use in architecting how subscription flow work users can subscribe both projects , on per project task basis. of concerns listed above addressed please?

i'd set project_subscriptions table , task_subscriptions table. allow task_subscriptions have both "positive" (user subscribed task in project don't subscribe to) , "negative" rows (rows exclude specific task if user subscribed project).


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -