SOA: Open Item Availability from Agent panel#9310
Conversation
|
Could not find a linked ADO work item. Please link one by using the pattern 'AB#' followed by the relevant work item number. You may use the 'Fixes' keyword to automatically resolve the work item when the pull request is merged. E.g. 'Fixes AB#1234' |
| if LocationFilter = '' then | ||
| LocationFilter := ''''''; | ||
|
|
||
| Rec.SetFilter(Description, '*Chair*'); |
There was a problem hiding this comment.
In OnOpenPage, for every order-taker agent session the code now hard-codes Rec.SetFilter(Description, 'Chair'), Rec.SetFilter("Location Filter", 'RED'), and Rec."Location Filter" := 'RED' unconditionally.
This forces the Multi Items Availability page to only ever show items whose description contains 'Chair' and to always filter/assign location 'RED', overriding the caller-supplied LocationFilter that was just resolved above. This looks like leftover debug/test code rather than intended logic — if merged as-is it breaks item availability lookups for every agent session for any item that is not a chair and any location other than 'RED'. Note: the underlying impact is functionally severe (broken feature for all real usage), but per BCQuality's agent-finding contract this is capped at minor severity since it is not backed by a curated knowledge rule; it should be verified with the author and removed before merge.
Recommendation:
- remove the three hard-coded lines and restore the prior behavior where only LocationFilter (and the earlier no.-filter logic) governs the record filters.
👍 useful · ❤️ especially valuable · 👎 wrong - reply with why
| SOAAnnotation: Codeunit "SOA Annotation"; | ||
| SOASetupCU: Codeunit "SOA Setup"; | ||
|
|
||
| procedure GetCreateAgentTaskPageId(AgentUserId: Guid): Integer |
There was a problem hiding this comment.
GetCreateAgentTaskPageId(AgentUserId: Guid): Integer, added as part of the IAgentFactory implementation, has an empty body with no exit() call and no assignment to the implicit return value.
It will therefore return the default Integer value 0, which is not a valid page ID. Every other procedure in this codeunit that returns an object ID (GetFirstTimeSetupPageId, GetSetupPageId, GetSummaryPageId, GetAgentTaskMessagePageId) exits with a concrete Page::"..." reference. This is an incomplete stub that will surface as a runtime error (or silently open page 0) wherever the platform invokes IAgentFactory.GetCreateAgentTaskPageId.
Recommendation:
- implement the method to exit with the actual page that should open when an agent task is created (following the pattern of the sibling GetXxxPageId procedures) before merging.
👍 useful · ❤️ especially valuable · 👎 wrong - reply with why
Copilot PR ReviewIteration 1 · Outcome: completed Knowledge source: https://github.com/microsoft/BCQuality@822cae1b2771ac25f665f73369f69093bd4fd630 Findings by domainFindings split into Knowledge-backed (cite a BCQuality article) and Agent (the agent's own judgement, no matching BCQuality rule).
Totals: 0 knowledge-backed · 2 agent findings. Orchestrator pre-filter (13 file(s) excluded)
Findings produced by the Copilot CLI agent against BCQuality at |
Open Item Availability page with filters from agent