Skip to content

fix export controls - missing attributes#581

Merged
dbarzin merged 1 commit intomainfrom
dev
Mar 11, 2026
Merged

fix export controls - missing attributes#581
dbarzin merged 1 commit intomainfrom
dev

Conversation

@dbarzin
Copy link
Copy Markdown
Owner

@dbarzin dbarzin commented Mar 11, 2026

Summary by CodeRabbit

Release Notes

  • New Features
    • Exports now include additional data fields for enhanced reporting.
    • Updated export column structure with improved layout and organization.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: fcdb2fbc-ee04-4db1-a91b-4e90265c5c0f

📥 Commits

Reviewing files that changed from the base of the PR and between 9a395b6 and 5138649.

📒 Files selected for processing (2)
  • app/Exports/ControlsExport.php
  • app/Http/Controllers/ControlController.php

Walkthrough

The export structure for Controls is enhanced with new columns (attributes and input) and updated field mappings, while authorization logic in the controller is refactored from numeric role comparisons to method-based checks for improved code readability.

Changes

Cohort / File(s) Summary
Export Structure Enhancement
app/Exports/ControlsExport.php
Added new attributes and input columns to the export. Updated column width definitions and data mapping to reflect the new field sequence.
Authorization Refactoring
app/Http/Controllers/ControlController.php
Replaced numeric role checks (role !== 1 && role !== 2) with method-based calls (!isAdmin() && !isUser()) in export authorization logic.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A new column hops into the export with grace,
Attributes and input find their rightful place,
While roles shed their numbers for methods so fine,
The code reads cleaner, a change most divine!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
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 (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix export controls - missing attributes' clearly and directly relates to the main changes in the changeset, which add the missing 'attributes' field to the ControlsExport class.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

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 and usage tips.

@dbarzin dbarzin merged commit 63339c0 into main Mar 11, 2026
1 check passed
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.

1 participant