openpoke/decidim-module-reporting-proposals

Allow admins to assign valuators to a category

Closed this issue · 0 comments

The point of this is to be able to assign valuators automatically to a proposal every time a proposal is created (see #26). For this we need a new zone and a new table that relates valuators and categories in a many to many relationship.

flowchart LR
    A[decidim_categories] <--> B(decidim_reporting_proposals_categories_valuators) <--> C(decidim_users)
Loading

image

  • Create a new migration adding the relational table between categories and users
  • Hack the admin categories controller with a concern and deface to achieve:
    • List existing valuators assigned to a categories (can be more than one)
    • Add a button to a new controller to handle the assignation of the valuators
  • Create a new controller for assigning valuator users to categories, it will be accessed from the categories view, so we need only the show view that handles the assignations in the same manner as the assignations of valuators in a proposal:
    image
  • Add tests

Notes:

  • any process admin should be able to do this action, other roles (like valuators will not be allowed)