fix: count QSOs confirmed by either LoTW or DCL in stats

QSO stats were only counting LoTW-confirmed QSOs, excluding
QSOs confirmed only by DCL from the "confirmed" count.

Changed getQSOStats() to count QSOs as confirmed if EITHER
LoTW OR DCL has confirmed them:
- Before: q.lotwQslRstatus === 'Y'
- After: q.lotwQslRstatus === 'Y' || q.dclQslRstatus === 'Y'

Fixes stats showing 8317/8338 confirmed when all QSOs were
confirmed by at least one system.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-19 13:32:45 +01:00
parent b40d3639f7
commit bee02d16ce
2 changed files with 6 additions and 1 deletions

View File

@@ -401,6 +401,11 @@ Both LoTW and DCL return data in ADIF (Amateur Data Interchange Format):
### Recent Commits
- `[uncommitted]`: fix: count QSOs confirmed by either LoTW or DCL in stats
- QSO stats were only counting LoTW-confirmed QSOs (`lotwQslRstatus === 'Y'`)
- QSOs confirmed only by DCL were excluded from "confirmed" count
- Fixed by changing filter to: `q.lotwQslRstatus === 'Y' || q.dclQslRstatus === 'Y'`
- Now correctly shows all QSOs confirmed by at least one system
- `233888c`: fix: make ADIF parser case-insensitive for EOR delimiter
- **Critical bug**: LoTW uses lowercase `<eor>` tags, parser was splitting on uppercase `<EOR>`
- Caused 242K+ QSOs to be parsed as 1 giant record with fields overwriting each other

View File

@@ -401,7 +401,7 @@ export async function getUserQSOs(userId, filters = {}, options = {}) {
*/
export async function getQSOStats(userId) {
const allQSOs = await db.select().from(qsos).where(eq(qsos.userId, userId));
const confirmed = allQSOs.filter((q) => q.lotwQslRstatus === 'Y');
const confirmed = allQSOs.filter((q) => q.lotwQslRstatus === 'Y' || q.dclQslRstatus === 'Y');
const uniqueEntities = new Set();
const uniqueBands = new Set();