Closed briand44 closed 1 month ago
In the work in #8017, filtering occurs in docroot/sites/registrar.uiowa.edu/modules/registrar_core/src/Form/CorrespondenceForm.php:
$data = $this->connection
->select('correspondence_archives', 'c')
->fields('c')
->condition('audience', '%' . $mapping[$audience] . '%', 'LIKE')
->orderBy('timestamp', 'DESC')
->execute();
For the additional tags filtering, we can do something similar with adding an additional ->condition('tags', '%' . $filter_variable . '%', 'LIKE')
. There is a tags
column in the custom database with all the tags from Dispatch in a space delimited string. (Chained conditionals with the database API operate as an AND
, which I think we'd want in this case.)
We can either massage the values in the form on display, or pre-process them at the point of fetching and store them as their display values instead of their Dispatch machine-name tags. Either way the filtering above should work the same.
Grooming conversation... The tags already live in a custom db table. Should be able to use similar code to the audience filter. Cory mentioned possibly preprocessing the tags so they are stored in db as they would appear in the filter. grad_analysis
would be displayed as Degree Services
. Should we store it as grad_analysis
or Degree Services
. Currently storing faculty_staff
in db as Faculty/Staff
.
May be able to use some accessibility work done in course deadlines here.
Noting that storing the data in the post-processed format (Degree Services
vs grad_analysis
) would be more future maintenance to change it because it would require and update hook.
Josh wants to start with the following for the additional filter but there will likely be more he wants us to add once they finalize the list. He also wants to make sure correspondence without a secondary tag will still show in the overall list.
Dispatch Tag | Website Tag |
---|---|
classroom scheduling | Classroom Scheduling |
commencement | Commencement |
grad_analysis | Degree Services |
exam | Exams |
grades | Grades |
registration | Registration |
Stories
As a Registrar site owner, we would like to be able to filter correspondence by additional tags so that users can more easily find the correspondence they are searching for.
As a web team, we would like to review the correspondence feature for accessibility and add any enhancements so we can make sure we meet WCAG 2.1 aa standards.
Additional Info
Registrar is planning on providing the tags that they want to include as part of the additional filter and any mappings needed.