Skip to content

Fix module segment headers in analytics export - #9206

Open
miachillgood wants to merge 3 commits into
makeplane:previewfrom
miachillgood:fix/module-segment-export-headers
Open

Fix module segment headers in analytics export#9206
miachillgood wants to merge 3 commits into
makeplane:previewfrom
miachillgood:fix/module-segment-export-headers

Conversation

@miachillgood

@miachillgood miachillgood commented Jun 4, 2026

Copy link
Copy Markdown

Summary

  • Resolve module segment CSV headers from module details instead of label details
  • Add unit coverage for module segment header mapping

Fixes #9174

Tests

  • git diff --check origin/preview...fix/module-segment-export-headers
  • python -m compileall -q apps/api/plane/bgtasks/analytic_plot_export.py apps/api/plane/tests/unit/bg_tasks/test_analytic_plot_export.py

Not run:

  • python -m pytest plane/tests/unit/bg_tasks/test_analytic_plot_export.py (local environment is missing the project dependency celery)
  • python -m ruff check ... (local environment is missing ruff)

Summary by CodeRabbit

  • Bug Fixes

    • Corrected module name resolution in segmented analytics exports, ensuring accurate module names display in CSV exports when segmenting data by module dimension.
    • Improved avatar URL handling in analytics exports for more reliable display of assignee avatars.
  • Tests

    • Added unit tests verifying that module segment headers correctly display the associated module names in exported analytics data.

@CLAassistant

CLAassistant commented Jun 4, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e4130e2b-921c-4b88-a502-0152a3aef1c1

📥 Commits

Reviewing files that changed from the base of the PR and between b6e47cc and ffbeb5b.

📒 Files selected for processing (2)
  • apps/api/plane/bgtasks/analytic_plot_export.py
  • apps/api/plane/tests/unit/bg_tasks/test_analytic_plot_export.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/api/plane/tests/unit/bg_tasks/test_analytic_plot_export.py
  • apps/api/plane/bgtasks/analytic_plot_export.py

📝 Walkthrough

Walkthrough

This PR updates analytics export handling. Avatar asset values are cast before URL construction. Module segment headers now resolve names from module_details. A unit test validates the module header output.

Changes

Analytics Export Corrections

Layer / File(s) Summary
Avatar URL value casting
apps/api/plane/bgtasks/analytic_plot_export.py
Avatar asset values are cast to CharField before they are concatenated into generated URLs.
Module segment header lookup and verification
apps/api/plane/bgtasks/analytic_plot_export.py, apps/api/plane/tests/unit/bg_tasks/test_analytic_plot_export.py
Module segment headers now use module_details to resolve module names. A unit test verifies the resulting header.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: dheeru0198, pablohashescobar

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The avatar asset Cast change is unrelated to the linked issue about module segment headers. Remove the unrelated avatar asset Cast change or move it to a separate pull request with its own linked issue.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: fixing module segment headers in analytics exports.
Description check ✅ Passed The description explains the fix, references issue #9174, and records completed and skipped tests.
Linked Issues check ✅ Passed The changes resolve module headers from module details and add unit coverage, satisfying issue #9174.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Module Segment Headers Show Raw UUIDs Instead of Names in Analytics Export

2 participants