Company form: choosing a NACE division from the suggestions splits it at its commas into made-up industries #531
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#531
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on 2026-09-29 in a read-only review of postulo at
95348908d, reading the Other industries box against the suggestions it offers and saving one in a test.Checked again on 2026-10-01 against
mainat0a5cad587: still present. The code is now atjobs/forms.py:118-124(new_industries),jobs/forms.py:280-289(CompanyForm.suggestions),jobs/forms.py:331-334(_add_new_industries) andstatic/js/app.js:1632-1642(typedNames);jobs/models.py:104-107andjobs/industries.py:183-201have not moved.The Other industries box offers the NACE division names as suggestions (#140), and then splits whatever it holds at every comma, semicolon and slash. Many division names contain one of those, so choosing a suggestion creates two or three fragments instead of the division.
jobs/forms.py:117-123(new_industries, with theindustry-suggestionsdatalist);jobs/forms.py:279-288(CompanyForm.suggestions) andjobs/industries.py:183-201(suggestions, which adds every division name);jobs/forms.py:330-333(_add_new_industries) andjobs/models.py:104-107(Industry.split,re.split(r"[;,/]", ...)); the label control does the same in the browser,static/js/app.js:1399-1409(typedNames,.split(/[;,/]/)).,,;or/.Industry.split(andtypedNames), first take out any run that matches a suggestion (industries.divisions()in the reading and fallback languages, andSTARTER_INDUSTRIES), then split what is left. Alternatively separate typed names with a character no division contains, and say so in the help text, which today reads "Separate several with commas."Done when
tests/test_nace.pythat saves a company with Manufacture of computer, electronic and optical products (and with that name plus Software, comma-separated) under Other industries and gets exactly the division, with code26, plus Software.