fix(hamlog): read the site's own confirmation field, not a guessed one

A real record from their export settles it:

	<CALL:4>RL6M … <CNTY:5>RO-19 <APP_HAMLOG_R150COUNTRY:6>Russia
	<APP_HAMLOG_QSO_CFM:1>Y

The confirmation lives in APP_HAMLOG_QSO_CFM. The four names guessed before a
file was available — APP_HAMLOG_QSL and friends — were all wrong, which is the
argument for reading one rather than reasoning about it.

So that becomes the canonical key everywhere: the award source, the row colours,
the grid column and the bulk editor. Importing a log downloaded from HAMLOG now
carries its confirmations into OpsLog with nothing to rename. The older names,
including the APP_OPSLOG_HAMLOG_QSL that OpsLog itself wrote in the meantime,
are still honoured on read so nothing already stamped stops counting.
This commit is contained in:
2026-08-23 13:43:10 +02:00
parent 086581851b
commit f4a72da118
7 changed files with 53 additions and 17 deletions
+16 -11
View File
@@ -1502,18 +1502,23 @@ func confirmed(q *qso.QSO, sources []string, d *Def) bool {
return false
}
// HamlogQSLKey is where a HAMLOG.online confirmation is recorded, as an ADIF
// extras key. Exported and re-imported like any other extra, so the state
// survives a move to another logger and back.
const HamlogQSLKey = "APP_OPSLOG_HAMLOG_QSL"
// hamlogAltKeys are the shapes an ADIF exported BY hamlog.online might use.
// HamlogQSLKey is where a HAMLOG.online confirmation is recorded.
//
// Their site publishes no field name, so rather than demand that an operator
// rename a column by hand after every export, the ones an export could
// plausibly carry are accepted too. Costs three map lookups; saves a support
// thread that would end in "edit your ADIF".
var hamlogAltKeys = []string{"APP_HAMLOG_QSL", "APP_HAMLOGONLINE_QSL", "HAMLOG_QSL_RCVD"}
// THEIR field name, taken from a real export:
//
// <APP_HAMLOG_QSO_CFM:1>Y
//
// Using the site's own key rather than one of ours is what makes an import
// simply work: a log downloaded from HAMLOG carries its confirmations into
// OpsLog with nothing to rename and no mapping to configure. The guesses this
// replaced (APP_HAMLOG_QSL and friends) were all wrong, which is the argument
// for reading a real file before naming a field.
const HamlogQSLKey = "APP_HAMLOG_QSO_CFM"
// hamlogAltKeys are older or hand-written spellings still honoured on read.
// APP_OPSLOG_HAMLOG_QSL is the one OpsLog itself wrote before a real export was
// available; a log stamped with it keeps counting.
var hamlogAltKeys = []string{"APP_OPSLOG_HAMLOG_QSL", "APP_HAMLOG_QSL", "APP_HAMLOGONLINE_QSL", "HAMLOG_QSL_RCVD"}
// hamlogConfirmed reports whether a QSO carries a HAMLOG.online confirmation.
//