fix(rm-group): enhance UngroupedItem and ListUngroupedItemsRequest for improved grouping monitor view with new filtering and sorting options#25
Merged
ilramdhan merged 1 commit intomutugading:mainfrom May 5, 2026
Conversation
…r improved grouping monitor view with new filtering and sorting options
There was a problem hiding this comment.
Pull request overview
This PR reshapes the finance RM grouping monitor API in finance.v1 so the existing ungrouped-item list/export contracts can represent both grouped and ungrouped views, with new scope and sorting controls.
Changes:
- Added
RMGroupingScopeto distinguish grouped vs. ungrouped monitor views. - Reworked
UngroupedItemfrom a period-specific snapshot into a cross-period grouping-monitor row with optional group assignment fields. - Updated list/export request messages to remove the period filter and add
scope,sort_by, andsort_order.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+204
to
+207
| reserved 1; | ||
| reserved "period"; | ||
| reserved 8 to 25; | ||
| reserved "cons_val", "stores_val", "cons_qty", "cons_rate", "stores_qty", "stores_rate", "dept_qty", "dept_val", "dept_rate", "last_po_qty1", "last_po_val1", "last_po_rate1", "last_po_qty2", "last_po_val2", "last_po_rate2", "last_po_qty3", "last_po_val3", "last_po_rate3"; |
Comment on lines
+566
to
+567
| reserved 3; | ||
| reserved "period"; |
Comment on lines
+656
to
+657
| reserved 1; | ||
| reserved "period"; |
Comment on lines
+576
to
578
| // Free-text search on item_code, item_name, grade_code, grade_name and | ||
| // (when scope = GROUPED) group_code / group_name. | ||
| string search = 4 [(buf.validate.field).string.max_len = 100]; |
Comment on lines
+659
to
661
| // Free-text search on item_code, item_name, grade_code, grade_name and | ||
| // (when scope = GROUPED) group_code / group_name. | ||
| string search = 2 [(buf.validate.field).string.max_len = 100]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request updates the raw material grouping monitor API to support both grouped and ungrouped item views, removes obsolete per-period snapshot fields, and adds flexible sorting and filtering options. The changes introduce a new grouping scope enum, update the
UngroupedItemmessage to reflect cross-period grouping status, and enhance the monitor/list/export endpoints to support the new functionality.Change Type
Proto Files Changed
finance/v1/rm_group.protoChanges Made
Grouping monitor enhancements:
RMGroupingScopeenum to distinguish between grouped and ungrouped item views, enabling the monitor and related endpoints to filter items based on current group assignment status, evaluated cross-period.Ungrouped/grouped item representation:
UngroupedItemmessage to remove obsolete per-period quantity/rate fields, reserving those field numbers and names. Added new fields for group assignment details (group_head_id,group_code,group_name,sort_order,assigned_at), which are populated only for grouped items.API changes for listing and exporting items:
ListUngroupedItemsRequestandExportUngroupedItemsRequestto:scopefield to select between grouped and ungrouped views.searchfield to include group code/name when in grouped mode.sort_byandsort_orderfields for sorting results by various columns, including group-related fields when applicable. [1] [2]Pre-merge Checklist
buf format -wappliedbuf lintpassesbuf breakingpassesImpact Assessment