fix(lookup): read the fields the providers were already sending

Audit of every field a lookup returns against what OpsLog can store, prompted
by a report that HamQTH was not fetching the email.

The email was never broken: pinned now against a captured HamQTH answer, it
parses and reaches the QSO. The reported callsign simply has no public address
on HamQTH, which the empty field could not distinguish from a fault — so the
"[email protected]" placeholder is gone. A greyed-out sample address in the one
field an operator checks to see whether the lookup found one reads as a value.

Real gaps found and closed:

- web: the qso table has had the column since migration 0003 and no provider
  mapping ever read it. HamQTH sends <web>.
- picture: Result.ImageURL was documented "QRZ only" because HamQTH's element
  is <picture>, not <image>. It was there all along.
- zip: sent by both providers, read by neither.
- adr_name: used only as a fallback when a record carries neither nick nor
  name. Deliberately NOT preferred over <nick> — a log wants the name the
  operator goes by on the air, "Igor", not "Igor Vladimirovich Getman".

The parse tests use a real captured payload, including the stray <div> advert
the server injects into its own XML.
This commit is contained in:
2026-08-12 17:34:45 +02:00
parent 4f3c3edaee
commit 2f5fd63afd
9 changed files with 202 additions and 15 deletions
+9 -2
View File
@@ -42,6 +42,7 @@ export interface DetailsState {
srx_string?: string;
stx_string?: string;
email: string;
web?: string;
// Award references for the contacted station (set via the Awards tab picker).
// Semicolon-delimited "AWARD@REF" entries, e.g. "POTA@FR-11553;IOTA@EU-064".
// App.tsx maps these back to pota_ref/sota_ref/iota when saving the QSO.
@@ -498,8 +499,14 @@ export function DetailsPanel({ callsign, prefix, operatorGrid, remoteGrid, qth,
<Field label="STX">
<Input value={details.stx_string ?? ''} placeholder={t('detp.sentExchangePh')} onChange={(e) => onChange({ stx_string: e.target.value })} />
</Field>
<Field label={t('detp.contactedEmail')} span={3}>
<Input value={details.email} placeholder="[email protected]" onChange={(e) => onChange({ email: e.target.value })} />
{/* No placeholder: a greyed-out sample address in an empty field reads
as a value the lookup found, and that is exactly the field an
operator checks to see whether it found one. */}
<Field label={t('detp.contactedEmail')} span={2}>
<Input value={details.email} onChange={(e) => onChange({ email: e.target.value })} />
</Field>
<Field label={t('detp.contactedWeb')}>
<Input value={details.web ?? ''} onChange={(e) => onChange({ web: e.target.value })} />
</Field>
</div>
)}