Page MenuHomePhabricator

Add selectable general topic to contact form
Closed, ResolvedPublic1 Estimated Story Points


As a fundraising service team member,
I want have incoming emails categorized automatically,
so that I can prioritize better.

Acceptance Criteria:

  • The contact form provides a select field containing options of general topics to choose from.
  • Users can only pick one of the entries.
  • The selected topic is sent as part of the content body as follows: Thema: {{value}}.
  • The label of the field says "Bitte wählen Sie ein Thema aus" and is positioned below the subject field.
  • No value is preselected.
  • The newly added field is mandatory.

Visitors of our donation application use the contact form pretty often. The system processing the incoming requests is capable of categorizing based on several conditions, (e. g. content body). Providing users with an additional field for categorization of their request enables us to filter incoming requests based on that information.

Event Timeline


general topics:
1 Zuwendungsbescheinigung benötigt
2 Korrektur Zuwendungsbescheinigung
3 Änderung meiner Adresse/Emailadresse
4 Beendigung meiner Zuwendungen (Spende/Mitgliedschaft)
5 Änderung meiner Bankverbindung
6 Fragen zu meiner Mitgliedschaft/Spende
7 Sonstiges

kai.nissen updated the task description. (Show Details)Jun 4 2018, 10:27 AM
kai.nissen set the point value for this task to 3.
aniansson added a project: User-aniansson.
aniansson moved this task from Todo to Doing on the WMDE-FUN-Sprint-2018-05-28 board.
kai.nissen updated the task description. (Show Details)Jun 5 2018, 12:03 PM
aniansson removed aniansson as the assignee of this task.Jun 7 2018, 10:20 AM
aniansson moved this task from Doing to Review on the WMDE-FUN-Sprint-2018-05-28 board.
aniansson added a subscriber: aniansson.

I've merged the pull request, but would like to request a followup to make the code less brittle in case the number of catgories changes:

  1. move the categories out of messages.json into their own JSON file in i18n/de_DE/data/contact_categories.json
  2. Add an array parameter for the categories to GetInTouchHtmlPresenter. That array should be passed as contact_categories on to the template in the render call of the presenter.
  3. In FunFunFactory::newGetInTouchHtmlPresenter load the language-appropriate data file (see for inspiration, maybe that can be extracted into a private loadLocalizedData method)
  4. Use for category in contact_categories in the templates. - Gabriel's follow up on placeholder colors in different browsers - My follow up on making the categories an array

Lea_WMDE changed the point value for this task from 3 to 1.

@tmletzko pointed out two issues:

  • When selecting a value, that exceeds (i. e. "Beendigung meiner Zuwendungen (Spende/Mitgliedschaft)") the width of the field, the layout breaks (see screenshot). This happens in Firefox 52 (which is ESR) on at least Windows and macOS.

  • Since the topic is a mandatory field, the label should not be part of the selectable options.

Since the topic is a mandatory field, the label should not be part of the selectable options.

So we should move it out of the select field and place it as a label in on top of the field, breaking the consistency of the rest of the form? please ask UX about that. From a validation point of view, you *can* select the label, but it has a different color and is not a valid input.

The address form contains a mandatory salutation field and an optional field for the academic title (see screenshot below). The topic selection field should look and behave like the salutation field: Showing a label, that is not added as a selectable option.

@tmletzko The form layout breaking when choosing a value that is wider than the field seems to be a bug in Firefox ESR 52 only. We will change the value to a fitting size (by removing the text in brackets, as you already proposed).

Vvjjkkii renamed this task from Add selectable general topic to contact form to iadaaaaaaa.Jul 1 2018, 1:10 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed the point value for this task.
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot set the point value for this task to 1.Jul 1 2018, 2:54 PM
CommunityTechBot updated the task description. (Show Details)
Vachovec1 renamed this task from iadaaaaaaa to Add selectable general topic to contact form.Jul 1 2018, 4:43 PM
Vachovec1 raised the priority of this task from High to Needs Triage.
Vachovec1 added a subscriber: Aklapper.
kai.nissen closed this task as Resolved.Jul 23 2018, 11:15 AM

If you do not fill a required field (for example "Thema" or "Betreff") then the message "Dieses Feld ist ein Pflichtfeld" is displayed, but also all previously typed data will be deleted. That should not happen.

@kai.nissen please be aware of this reported bug