Conflate all department/departments plus attendees
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
KARL3 |
Fix Released
|
Low
|
Chris Rossi |
Bug Description
I believe that we have some skew in department vs. departments, with some repetition/
For example, baseforms.py has this:
department = validators.
departments = CommaSplitter(
I believe the way it should work is this:
a. Affiliates get to edit their departments. Staff do not see this on their profile. However, this will be assigned by the sync application (you might need to email osi-dev to see if Jason is sending you a sequence, comma-sep string, whatever.)
b. When the field is displayed on the form, it is coerced from a sequence to a comma-separated string.
c. It is stored as a list.
d. The View Profile and the two views (pictures and listing) for community membership need to show it as comma-sep.
If possible, get rid of the department field in baseforms, change occurrences of it to use departments, then fix the zpts that display the values to be consistent. Use the tal:condition test for last value in a sequence to stitch things together with a comma (or don't use tal:repeat on the values, and instead do ${', '.join(
UPDATE
===========
The Attendees field on calendar events has a similar problem. If you add an event with multiple
TO DO
======
1) Get rid of the CommaSplitter validator in baseforms. I don't think anything is using it, but make sure.
2) Find all the places the use department, departments, or attendees as either form fields or display on a page. (Accept Invitation, Edit Profile, Show Profile, Community Members, possibly in karl.peopledir, Show Calendar Event, Add/Edit Calendar Event.)
3) Replace the ZPT with a snippet for display, using semicolons to join. Replace the formfield with textarea-oriented snippets.
4) Make sure the formfield for departments and for attendees has some help text explaining that each line is a value.
5) Make sure it says "Departments" plural. For this one, the help text should also explain that the first value is the "primary" department.
6) Add a _from_python to the TextAreaToList for co-ercion, rather then doing this in the add/edit views.
7) Make sure the unit and twill tests pass.
description: | updated |
Changed in karl3: | |
status: | New → In Progress |
Changed in karl3: | |
status: | Fix Committed → Fix Released |
Hi Chris. This bug exhibited itself when I created an affiliate (who can edit their Department value) and added them to a community. When clicking on Members in the community I saw ['department1', 'department2'] in the little orange box.