docs: say that the import option also fills the confirmation statuses
Asked for as a missing feature. It is not missing — the "fill my station fields" option has stamped the default QSL / LoTW / eQSL / Club Log / HRDLog / QRZ.com statuses on empty fields since v0.14. What was missing is any mention of it: the option's description talked only about MY_* fields, so the behaviour was undiscoverable except by comparing a log before and after. The description now says it, in both languages, and names why it matters — a WSJT-X log carries almost no QSL fields. The rule is also pinned by a test now, which meant splitting the fill from the settings lookup: blanks are filled, existing values are never touched. Overwriting them would erase confirmations the operator has actually received, and that is the half a future edit is most likely to get wrong.
This commit is contained in:
@@ -8734,36 +8734,33 @@ func (a *App) applyQSLDefaults(q *qso.QSO) {
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
if q.QSLSent == "" {
|
||||
q.QSLSent = d.QSLSent
|
||||
}
|
||||
if q.QSLRcvd == "" {
|
||||
q.QSLRcvd = d.QSLRcvd
|
||||
}
|
||||
if q.LOTWSent == "" {
|
||||
q.LOTWSent = d.LOTWSent
|
||||
}
|
||||
if q.LOTWRcvd == "" {
|
||||
q.LOTWRcvd = d.LOTWRcvd
|
||||
}
|
||||
if q.EQSLSent == "" {
|
||||
q.EQSLSent = d.EQSLSent
|
||||
}
|
||||
if q.EQSLRcvd == "" {
|
||||
q.EQSLRcvd = d.EQSLRcvd
|
||||
}
|
||||
if q.ClublogUploadStatus == "" {
|
||||
q.ClublogUploadStatus = d.ClublogStatus
|
||||
}
|
||||
if q.HRDLogUploadStatus == "" {
|
||||
q.HRDLogUploadStatus = d.HRDLogStatus
|
||||
}
|
||||
if q.QRZComUploadStatus == "" {
|
||||
q.QRZComUploadStatus = d.QRZComStatus
|
||||
}
|
||||
if q.QRZComDownloadStatus == "" {
|
||||
q.QRZComDownloadStatus = d.QRZComCfm
|
||||
applyQSLDefaultsTo(q, d)
|
||||
}
|
||||
|
||||
// applyQSLDefaultsTo stamps the operator's default confirmation statuses on the
|
||||
// fields a QSO leaves EMPTY. Split from the settings lookup so the rule can be
|
||||
// tested: fill the blanks, never touch a value that is already there.
|
||||
//
|
||||
// The distinction matters on import. A WSJT-X log carries almost no QSL fields,
|
||||
// so without this every imported QSO would sit with blank statuses; a log
|
||||
// exported from another program carries real ones, and overwriting those would
|
||||
// erase confirmations the operator has actually received.
|
||||
func applyQSLDefaultsTo(q *qso.QSO, d QSLDefaults) {
|
||||
fill := func(dst *string, def string) {
|
||||
if *dst == "" {
|
||||
*dst = def
|
||||
}
|
||||
}
|
||||
fill(&q.QSLSent, d.QSLSent)
|
||||
fill(&q.QSLRcvd, d.QSLRcvd)
|
||||
fill(&q.LOTWSent, d.LOTWSent)
|
||||
fill(&q.LOTWRcvd, d.LOTWRcvd)
|
||||
fill(&q.EQSLSent, d.EQSLSent)
|
||||
fill(&q.EQSLRcvd, d.EQSLRcvd)
|
||||
fill(&q.ClublogUploadStatus, d.ClublogStatus)
|
||||
fill(&q.HRDLogUploadStatus, d.HRDLogStatus)
|
||||
fill(&q.QRZComUploadStatus, d.QRZComStatus)
|
||||
fill(&q.QRZComDownloadStatus, d.QRZComCfm)
|
||||
}
|
||||
|
||||
// ── External services (logbook upload) ─────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user