Skip to content

SOA: Open Item Availability from Agent panel#9310

Draft
VolodySyn wants to merge 2 commits into
mainfrom
features/569539-OpenItemAVA
Draft

SOA: Open Item Availability from Agent panel#9310
VolodySyn wants to merge 2 commits into
mainfrom
features/569539-OpenItemAVA

Conversation

@VolodySyn

@VolodySyn VolodySyn commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Open Item Availability page with filters from agent

@VolodySyn VolodySyn requested a review from a team July 10, 2026 09:12
@github-actions github-actions Bot added the AL: Apps (W1) Add-on apps for W1 label Jul 10, 2026
@VolodySyn VolodySyn marked this pull request as draft July 10, 2026 09:12
@github-actions

Copy link
Copy Markdown
Contributor

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*');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

$\textbf{🟡\ Medium\ Severity\ —\ Agent} \quad \color{gray}{\texttt{\small Iteration\ 1}}$

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

$\textbf{🟡\ Medium\ Severity\ —\ Agent} \quad \color{gray}{\texttt{\small Iteration\ 1}}$

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

@github-actions

Copy link
Copy Markdown
Contributor

Copilot PR Review

Iteration 1 · Outcome: completed

Knowledge source: https://github.com/microsoft/BCQuality@822cae1b2771ac25f665f73369f69093bd4fd630

Findings by domain

Findings split into Knowledge-backed (cite a BCQuality article) and Agent (the agent's own judgement, no matching BCQuality rule).

Domain Findings Knowledge-backed Agent Inline Fallback
Agent 2 0 2 2 0

Totals: 0 knowledge-backed · 2 agent findings.

Orchestrator pre-filter (13 file(s) excluded)

  • layer-disabled (knowledge) : 13 file(s)

Findings produced by the Copilot CLI agent against BCQuality at 822cae1b2771ac25f665f73369f69093bd4fd630. Reply 👎 on any inline comment to flag false positives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant