Skip to content

Add Update Report Definition support#159

Open
smcgowan-smartsheet wants to merge 8 commits intosmartsheet:mainlinefrom
smcgowan-smartsheet:feat/update_report_definition
Open

Add Update Report Definition support#159
smcgowan-smartsheet wants to merge 8 commits intosmartsheet:mainlinefrom
smcgowan-smartsheet:feat/update_report_definition

Conversation

@smcgowan-smartsheet
Copy link

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

Pull Request

Summary

Add Support for PATCH /reports/{id}/definition endpoints - Update Report Definition
Added Wiremock tests for the new endpoint

Checklist

  • Read the contribution guide
  • Successfully build your changes locally - Run ./gradlew clean build
  • Include a title that clearly describes your changes and references relevant issues / backlog items
  • Include a summary of your changes
  • Include tests for your changes where possible

@roomote-v0
Copy link

roomote-v0 bot commented Feb 20, 2026

Rooviewer Clock   See task

Review completed for commit 7757db4. The documentation has been corrected to reflect PUT instead of PATCH.

All previous issues have been addressed:

  • Update ReportResources.java javadoc to reflect PUT method instead of PATCH (resolved in commit 7757db4)
  • Removed the id field from ReportGroupingCriterion (as suggested in review comment #2840582364)
  • Removed forceNullsToBottom from ReportSortingCriterion (as suggested in review comment #2908187918)
  • Removed AUTO_NUMBER from ReportSystemColumnType (as suggested in review comment #2908177599)
Previous reviews

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

@smcgowan-smartsheet smcgowan-smartsheet marked this pull request as ready for review February 20, 2026 16:25
@smcgowan-smartsheet smcgowan-smartsheet changed the title Feat/update report definition Add Update Report Definition support Feb 20, 2026
@roomote-v0
Copy link

roomote-v0 bot commented Feb 20, 2026

Rooviewer Clock   See task

Review completed. The implementation looks solid and follows established patterns in the codebase. No issues were identified that require changes.

The PR successfully adds support for the PATCH /reports/{id}/definition endpoint with:

  • Well-structured model classes for report definitions, filters, grouping, aggregation, and sorting
  • Comprehensive enum types for operators and column types
  • Proper test coverage including URL validation, error handling, and edge cases
  • Consistent API integration following existing codebase patterns

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

remove read-only param as not in use
/**
* Represents the AUTO_NUMBER system column type.
*/
AUTO_NUMBER,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not supported by reports, should be removed from all SDKs

*
* @return true if nulls forced to bottom, false otherwise
*/
public Boolean getForceNullsToBottom() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This property will be removed

add update filters query param support
change aggregationCriteria to summarizingCriteria to match spec

add returns report definition
changed to PUT from PATCH

no longer returning changed definition

no longer needs query param
/**
* <p>Updates a report's definition (filters, grouping, summarize, and sorting).</p>
*
* <p>It mirrors to the following Smartsheet REST API method: PATCH /reports/{id}/definition</p>
Copy link

Choose a reason for hiding this comment

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

The documentation states this method mirrors "PATCH /reports/{id}/definition", but the implementation in ReportResourcesImpl.java (line 314) and the tests (TestUpdateReportDefinition.java line 92) both expect PUT. This should be updated to "PUT /reports/{id}/definition" to match the actual implementation.

Suggested change
* <p>It mirrors to the following Smartsheet REST API method: PATCH /reports/{id}/definition</p>
* <p>It mirrors to the following Smartsheet REST API method: PUT /reports/{id}/definition</p>

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

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.

3 participants