Skip to content

Use city name without type for delivery and keep settlement in address - #522

Open
ekateluv wants to merge 1 commit into
fix/soft-7320-postal-indexfrom
fix/order-address-city-settlement
Open

Use city name without type for delivery and keep settlement in address#522
ekateluv wants to merge 1 commit into
fix/soft-7320-postal-indexfrom
fix/order-address-city-settlement

Conversation

@ekateluv

@ekateluv ekateluv commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Стек поверх #521 (общий файл AddressAutocomplete.vue);


Что происходит; кому и зачем нужно:

СДЭК определяет город доставки по индексу, а когда индекса нет в его базе (новостройки) — по названию, и названия с типом («г Мытищи») не резолвятся: выпадает ошибка «Доставка по данному адресу невозможна» (пример: Мытищи, пос. Нагорное, ул Полковника Романова 11, индекс 141095). Кроме того, посёлок внутри городского округа терялся из адреса целиком — в накладную ушла бы улица без посёлка.


Что поменялось для пользователей:

Город из dadata пишется именем («Мытищи»), а посёлок при заполненном городе дописывается в начало строки улицы («поселок Нагорное, ул Полковника Романова») - если индекса нет то сдек найдет по названию города.


Как проверял/а:

на тестовом


Чеклист ревью:

Перед мержем не забудь проверить:

  • правописание в тексте, опечатки

Опционально (но важно для изменений в инфраструктуру):

  • задеплоить на stage, чтобы проверить, что все работает

@ekateluv
ekateluv requested a review from a team as a code owner August 14, 2026 14:56
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

CDEK resolves the delivery destination by postal code, but when the code
is missing from its base (new developments), it falls back to the locality
name, and city names with type prefixes such as 'г Мытищи' fail to
resolve, so the checkout rejected such addresses with a delivery error.
Bare city names from dadata resolve correctly.

A settlement inside an urban district (поселок Нагорное in Мытищи) was
previously dropped from the address entirely; now it is prepended to the
street line. A settlement-only address (no city, e.g. пгт Лесной) keeps
the typed settlement name as the locality so the type is not lost and
nothing is written twice.
@ekateluv
ekateluv force-pushed the fix/order-address-city-settlement branch from 96372bd to 2e4cb38 Compare August 14, 2026 15:17
@ekateluv ekateluv changed the title Use bare locality name for delivery city and keep settlement in address Use bare city name for delivery city and keep settlement in address Aug 14, 2026
@ekateluv ekateluv changed the title Use bare city name for delivery city and keep settlement in address Use city name without type for delivery and keep settlement in address Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant