Several addresses, several pins: count a company at every place it has an address #703
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#703
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?
From the list: “Multiple addresses = multiple pins on a map.” The map draws one dot per place, from one location per company. Once an address can be placed (#702), an employer with offices in three cities has to be at three places, and the page's counts have to say what they now count. The engine and precision are #700's.
What exists today
CompanyMapViewreads each company'slocationtext and its one coordinate, groups companies by the text, counts how many are at each place and draws one proportional dot per place, with the list beside it as the page (src/postulo/jobs/views.py:147-199,src/postulo/templates/jobs/company_map.html). A place's coordinate is the first one found for that text (views.py:182-184).PostalAddress,src/postulo/core/models.py:486-570, constraintone_primary_address_per_holder), for a profile and a contact; a company will once #329 lands. Nothing draws more than one.company_map.html). With several addresses that sentence would be wrong.Checked against
mainatf09b6010b.Proposal
Decisions
locationtext and its addresses. Once a company has pinned addresses, the text's own dot is either kept as an extra place, replaced by the addresses, or used only when there is none. Recommended: used only when there is no pinned address, so a company is not drawn twice at one town; the text stays on the record.Builds on
Issues #92 (several addresses), #108 (the map's list-first rule), #329 (companies get addresses). #700 decides the engine and what may be drawn; #702 places an address.
Done when
tests/test_company_map.py: a company with two pinned addresses in two towns appears at both with a count of one each; two spellings of one town are one place; a company with no pinned address still uses its text; the totals sentence is present only when it is true; a second owner's addresses never appear.tests/e2e/test_accessibility.py:471visits it, andtests/test_page_coverage.pyholds every URL to that list) and works with scripts off.Configuration.md:114-115), is updated.From the list of improvements of 2026-10-02.
From the maintainer's improvements list of 2026-10-07: every company is a pin on the map. Today one dot per place, sized by how many companies are there (
jobs/views.py:153-226); this issue already moves grouping from the location text to the resolved coordinate. The request reads as one marker per company — at a zoom where companies at one place are distinguishable, a cluster otherwise (Leaflet's own clustering is a plugin; #700 vendors Leaflet only). Recommended: one marker per company inside each place's cluster, the cluster count as today. The full-window map and the location button are filed as their own issues. Checked againstmainat8c3d03570.