• MyCCE User/Entity Relationship Design

    The Problem

    How do we let users select a group of users to assign/relate an entity to? How do we record the selection of users as well as the mechanism for grouping to apply changes? There are several cases (notifications, content assignments, tag assignments) where an entity is related to a group of users, and the user who selects that group selects them based on location and role (supervisors in Tompkins county). The entity must then hold a relationship with those users, but also any future users of the group (supervisors in Tompkins county).

  • Primary Questions

    These questions need to be answered first and foremost

  • Hooks

    Which actions change the concrete user lists?

  • Secondary Questions

    Answer after Primary

  • Closed Questions

  • Design

  • Requirements

    • Notifications, Content, ContentAssignments, and TagAssignments are all related to a certain set of users.
    • Each set of users is both a concrete list of users, and an abstract grouping of users (ex: supervisors in Tompkins).
    • We need to constantly ensure that the concrete lists reflect the abstract groupings (a new supervisor in Tompkins should be added to all the concrete lists generated by the supervsiors in tompkins abstract grouping)
  • Is this all too complicated?

    This is certainly complicated behind the scenes. Of course, that isn’t inherently a problem. But is it complicated for users? In some cases, no, some of this is expected behavior. If you want something to appear for supervisors in Tompkins, you don’t mean those who are currently supervisors in Tompkins. In that case it is absolutely necessary.

    But I still feel like there are cases where it is confusing. The possible confusion lies in users not seeing changes in the content they see on their dashboard and sitewide. A user will get to know what content is where. If their location/role changes, and the content changes, that could be confusing. I guess in a perfect world, the change means that their position is different, which changes what content is relevant to them. That’s different and potentially confusing at first, but it’s intentional. That’s the whole point - MyCCE. Presenting staff with content that is relevant to them. Keeping this manageably by filtering out what isn’t relevant.

  • How do we maintain data consistency?

  • Content

  • Notifications

  • What does the assignment creation process look like?

  • Database

  • Hooks

  • Notifications

    • Notifications are time sensitive, so the only ones that should get added for a new user are active tasks
  • Content and Tag Assignments

    • Users can remove themselves from content assignments, so the abstract grouping does not necessarily reflect the proper concrete list
  • which hooks?

  • how do you keep it clean?

  • Do we need a second table?

    • ContentAssignments and ContentUserAssignments?
    • ContentAssignments with a onDashboard bool?
    • Maybe we keep assignments table for dashboard, and don’t use an assignments table for the regular content relationship since users can’t remove content from their view of mycce?
      • maybe they should be able to?
  • Does doctrine allow for multiple levels of inheritance (for Content)?

    • new assignment (tag, tompkins, supervisors)
    • add tagAssignments for the users that match
      • how do we make this generic?
{"cards":[{"_id":"3549d0e84f0f68794e000018","treeId":"3549d0d54f0f68794e000015","seq":1,"position":1,"parentId":null,"content":"# MyCCE User/Entity Relationship Design\n\n## The Problem\nHow do we let users select a group of users to assign/relate an entity to? How do we record the selection of users as well as the mechanism for grouping to apply changes? There are several cases (notifications, content assignments, tag assignments) where an entity is related to a group of users, and the user who selects that group selects them based on location and role (supervisors in Tompkins county). The entity must then hold a relationship with those users, but also any future users of the group (supervisors in Tompkins county)."},{"_id":"3549e12b4f0f68794e00001f","treeId":"3549d0d54f0f68794e000015","seq":1,"position":1,"parentId":"3549d0e84f0f68794e000018","content":"## Requirements\n\n* *Notifications*, *Content*, *ContentAssignments*, and *TagAssignments* are all related to a certain set of users. \n* Each set of users is both a concrete list of users, and an abstract grouping of users (ex: supervisors in Tompkins).\n* We need to constantly ensure that the concrete lists reflect the abstract groupings (a new supervisor in Tompkins should be added to all the concrete lists generated by the supervsiors in tompkins abstract grouping)"},{"_id":"354a1c744f0f68794e000020","treeId":"3549d0d54f0f68794e000015","seq":1,"position":1,"parentId":"3549e12b4f0f68794e00001f","content":"### Notifications\n* Notifications are time sensitive, so the only ones that should get added for a new user are active tasks"},{"_id":"354a1f024f0f68794e000021","treeId":"3549d0d54f0f68794e000015","seq":1,"position":2,"parentId":"3549e12b4f0f68794e00001f","content":"### Content and Tag Assignments\n* Users can remove themselves from content assignments, so the abstract grouping does not necessarily reflect the proper concrete list"},{"_id":"3549de434f0f68794e00001e","treeId":"3549d0d54f0f68794e000015","seq":1,"position":2,"parentId":null,"content":"## Primary Questions\nThese questions need to be answered first and foremost"},{"_id":"354a43234f0f68794e000035","treeId":"3549d0d54f0f68794e000015","seq":1,"position":1,"parentId":"3549de434f0f68794e00001e","content":"## Is this all too complicated?\nThis is certainly complicated behind the scenes. Of course, that isn't inherently a problem. But is it complicated for users? In some cases, no, some of this is expected behavior. If you want something to appear for supervisors in Tompkins, you don't mean those who are currently supervisors in Tompkins. In that case it is absolutely necessary.\n\nBut I still feel like there are cases where it is confusing. The possible confusion lies in users not seeing changes in the content they see on their dashboard and sitewide. A user will get to know what content is where. If their location/role changes, and the content changes, that could be confusing. I guess in a perfect world, the change means that their position is different, which changes what content is relevant to them. That's different and potentially confusing at first, but it's intentional. That's the whole point - *My*CCE. Presenting staff with content that is relevant to them. Keeping this manageably by filtering out what isn't relevant."},{"_id":"3549db894f0f68794e00001c","treeId":"3549d0d54f0f68794e000015","seq":1,"position":2,"parentId":"3549de434f0f68794e00001e","content":"##How do we maintain data consistency?\n"},{"_id":"354a330f4f0f68794e00002a","treeId":"3549d0d54f0f68794e000015","seq":1,"position":1,"parentId":"3549db894f0f68794e00001c","content":"which hooks?"},{"_id":"354a33484f0f68794e00002b","treeId":"3549d0d54f0f68794e000015","seq":1,"position":2,"parentId":"3549db894f0f68794e00001c","content":"how do you keep it clean?"},{"_id":"354a285e4f0f68794e000023","treeId":"3549d0d54f0f68794e000015","seq":1,"position":4,"parentId":"3549de434f0f68794e00001e","content":"## Content"},{"_id":"354a2a374f0f68794e000024","treeId":"3549d0d54f0f68794e000015","seq":1,"position":1,"parentId":"354a285e4f0f68794e000023","content":"### Do we need a second table?\n* ContentAssignments and ContentUserAssignments?\n* ContentAssignments with a onDashboard bool?\n* Maybe we keep assignments table for dashboard, and don’t use an assignments table for the regular content relationship since users can’t remove content from their view of mycce?\n * maybe they should be able to?\n\n"},{"_id":"354a25514f0f68794e000022","treeId":"3549d0d54f0f68794e000015","seq":1,"position":2,"parentId":"354a285e4f0f68794e000023","content":"### Does doctrine allow for multiple levels of inheritance (for Content)?"},{"_id":"354a2e954f0f68794e000026","treeId":"3549d0d54f0f68794e000015","seq":1,"position":4.5,"parentId":"3549de434f0f68794e00001e","content":"## Notifications"},{"_id":"354a3dae4f0f68794e000033","treeId":"3549d0d54f0f68794e000015","seq":1,"position":2.5,"parentId":null,"content":"## Hooks\nWhich actions change the concrete user lists?"},{"_id":"354a310d4f0f68794e000029","treeId":"3549d0d54f0f68794e000015","seq":1,"position":3,"parentId":null,"content":"## Secondary Questions\nAnswer after Primary"},{"_id":"3549d7654f0f68794e00001b","treeId":"3549d0d54f0f68794e000015","seq":1,"position":2,"parentId":"354a310d4f0f68794e000029","content":"## What does the assignment creation process look like?"},{"_id":"354a34a34f0f68794e00002d","treeId":"3549d0d54f0f68794e000015","seq":1,"position":1,"parentId":"3549d7654f0f68794e00001b","content":"* new assignment (tag, tompkins, supervisors)\n* add tagAssignments for the users that match\n * how do we make this generic?"},{"_id":"354a3bb94f0f68794e000032","treeId":"3549d0d54f0f68794e000015","seq":1,"position":3.5,"parentId":null,"content":"## Closed Questions\n"},{"_id":"354a3a174f0f68794e00002f","treeId":"3549d0d54f0f68794e000015","seq":1,"position":4,"parentId":null,"content":"## Design"},{"_id":"354a3a524f0f68794e000030","treeId":"3549d0d54f0f68794e000015","seq":1,"position":1,"parentId":"354a3a174f0f68794e00002f","content":"## Database"},{"_id":"354a3ab84f0f68794e000031","treeId":"3549d0d54f0f68794e000015","seq":1,"position":2,"parentId":"354a3a174f0f68794e00002f","content":"## Hooks"}],"tree":{"_id":"3549d0d54f0f68794e000015","name":"MyCCE User/Entity Relationship Design","publicUrl":"mycceuserentityrelationshipdesign"}}