Skip to content

🐛 Fix som dashboard tasca1 days#1145

Merged
anxodio merged 2 commits intomainfrom
fix_som_dashboard_tasca1_days
Mar 9, 2026
Merged

🐛 Fix som dashboard tasca1 days#1145
anxodio merged 2 commits intomainfrom
fix_som_dashboard_tasca1_days

Conversation

@anxodio
Copy link
Contributor

@anxodio anxodio commented Mar 5, 2026

Objectiu

Arreglar el número de dies tal i com demanen a la incidència

Targeta on es demana o Incidència

https://freescout.somenergia.coop/conversation/8128442?folder_id=103

Comprovacions

  • Hi ha testos
  • Reiniciar serveis
  • Actualitzar mòdul
  • Script de migració
  • Modifica traduccions

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

Test Results

85 tests   85 ✅  0s ⏱️
 2 suites   0 💤
 2 files     0 ❌

Results for commit 8c30084.

♻️ This comment has been updated with latest results.

@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.90%. Comparing base (97d651d) to head (8c30084).
⚠️ Report is 27 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1145      +/-   ##
==========================================
- Coverage   51.92%   51.90%   -0.02%     
==========================================
  Files         639      638       -1     
  Lines       25196    25115      -81     
==========================================
- Hits        13082    13036      -46     
+ Misses      12114    12079      -35     
Flag Coverage Δ
base_extended_som -m som_leads_polissa ?
som_dashboard 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@anxodio anxodio force-pushed the fix_som_dashboard_tasca1_days branch from c36ea80 to 8c30084 Compare March 9, 2026 10:02
Copy link
Contributor

@destanyol destanyol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👦 A mi em sembla bé, passo en Claude 🤖 aviam si veu alguna cosa

Copy link
Contributor

@destanyol destanyol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Canvi simple i net. La migració está ben estructurada (usa load_data_records amb els IDs específics, consistent amb el patró existent). Un punt a verificar.


🟡 Asimetria entre els canvis: D1/02 elimina el filtre completament

Dels 4 registres modificats, 3 canvien days=2days=1, però action_ds_rebuig_dades_autoconsum_dashboard (D1/02) elimina el filtre de data completament:

# D1/02 (rebuig dades autoconsum)
- ('date', '<=', (datetime.datetime.today()-datetime.timedelta(days=2)).strftime('%Y-%m-%d'))
# ← sense filtre de data
# C/01, M/01 (amb i sense attachments)
- ('date', '<=', ... days=2 ...)
+ ('date', '<=', ... days=1 ...)

Sense filtre de data, el dashboard mostrarà tots els casos D1/02 pendents d'enviament independentment de quan es van crear. És això el que demana la incidència? O hauria de ser també days=1 (o un altre valor) com els altres?


🟢 Migració correcta

La migració actualitza exactament els 4 registres modificats al XML, consistent amb el patró dels post-0001 i post-0002 existents.


🤖 Reviewed by Claude Code

@anxodio
Copy link
Contributor Author

anxodio commented Mar 9, 2026

Sense filtre de data, el dashboard mostrarà tots els casos D1/02 pendents d'enviament independentment de quan es van crear. És això el que demana la incidència? O hauria de ser també days=1 (o un altre valor) com els altres?

És correcte, han demanat això perquè resulta que per les Ds mai s'hauria d'haver filtrat per data, ens ho van indicar malament la tarjeta original.

@anxodio anxodio merged commit defb1be into main Mar 9, 2026
6 checks passed
@anxodio anxodio deleted the fix_som_dashboard_tasca1_days branch March 9, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants