Skip to content

feat: add support for update report definition endpoint#125

Open
smcgowan-smartsheet wants to merge 10 commits intosmartsheet:mainlinefrom
smcgowan-smartsheet:feat/update-report-definition
Open

feat: add support for update report definition endpoint#125
smcgowan-smartsheet wants to merge 10 commits intosmartsheet:mainlinefrom
smcgowan-smartsheet:feat/update-report-definition

Conversation

@smcgowan-smartsheet
Copy link

@smcgowan-smartsheet smcgowan-smartsheet commented Feb 24, 2026

Pull Request

Description

Adding support for update report definition endpoint

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Code refactoring
  • Other (please describe):

What Changes Were Made

  • Support for PATCH /reports/{reportId}/definition endpoint
  • New update_report_definition() method in Reports class to update report definitions
  • New ReportDefinition model with support for filters, grouping, aggregation, and sorting criteria
  • New ReportFilterExpression model with recursive structure for complex filter logic
  • New ReportFilterCriterion model for individual filter conditions
  • New ReportColumnIdentifier model for identifying columns in report criteria
  • New ReportGroupingCriterion model for report grouping configuration
  • New ReportAggregationCriterion model for report aggregation configuration
  • New ReportSortingCriterion model for report sorting configuration
  • New ReportAggregationType enum (SUM, AVG, MIN, MAX, COUNT, FIRST, LAST)
  • New ReportBooleanOperator enum (AND, OR) for filter expressions
  • New ReportFilterOperator enum with 36 operators for filter criteria
  • New ReportSystemColumnType enum with report-specific system columns including SHEET_NAME
  • Type hints for all new report models and methods
  • WireMock integration tests for report definition update endpoint including nested filter validation

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have updated the relevant files in docs-source/ (see Documentation guidelines)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@roomote-v0
Copy link
Contributor

roomote-v0 bot commented Feb 24, 2026

Rooviewer Clock   See task

Review completed. All previously flagged issues remain resolved in the latest commit.

  • Fix alphabetical ordering in smartsheet_enums.rst - PredecessorType should appear before Report* enums
  • Use SDK's standard query_params pattern instead of manual string concatenation for updateFilters parameter
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

update docs-source with the new models, and enums
@smcgowan-smartsheet smcgowan-smartsheet marked this pull request as ready for review February 24, 2026 16:57
@roomote-v0
Copy link
Contributor

roomote-v0 bot commented Feb 24, 2026

Rooviewer Clock   See task

Review completed. The implementation looks solid and follows established SDK patterns. All models properly implement serialization, use appropriate type hints, and include comprehensive tests. The CHANGELOG has been updated appropriately. The previous alphabetical ordering issue in docs-source/smartsheet_enums.rst has been resolved.

  • Fix alphabetical ordering in smartsheet_enums.rst - PredecessorType should appear before Report* enums

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

add update filters query param support
"""
_op = fresh_operation("update_report_definition")
_op["method"] = "PATCH"
_op["path"] = "/reports/" + str(report_id) + "/definition?updateFilters=" + str(updateFilters).lower()
Copy link
Contributor

Choose a reason for hiding this comment

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

The query parameter is manually appended to the path string instead of using the SDK's standard query_params pattern. Every other method in this SDK uses _op["query_params"]["key"] = value (e.g., line 288: _op["query_params"]["sendEmail"] = send_email). This bypasses the SDK's query parameter processing in smartsheet.py and could cause URL encoding issues with more complex parameter values. The implementation should use _op["query_params"]["updateFilters"] = updateFilters instead of manual string concatenation.

Fix it with Roo Code or mention @roomote and request a fix.

change aggregationCriteria to summarizingCriteria to match spec
changed to PUT from PATCH

no longer returning changed definition

no longer needs query param
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