Skip to content

UIOR-1556 Show which export integration applies to a PO line - #1890

Open
thomas-sc wants to merge 3 commits into
masterfrom
UIOR-1556-show-applicable-export-integration
Open

thomas-sc wants to merge 3 commits into
masterfrom
UIOR-1556-show-applicable-export-integration

Conversation

@thomas-sc

@thomas-sc thomas-sc commented Oct 15, 2026 •

Copy link
Copy Markdown

Purpose

On a PO line the "Automatic export" checkbox only tells the orderer that the line is flagged for export, not which integration will pick it up, and nothing shows when no integration matches at all. Add a read-only hint next to the checkbox, in the edit form and in the detail view, and align the checkbox calculation with the backend routing.

Approach

getApplicableOrderingIntegrations reproduces the PO line query that mod-data-export-worker builds for each integration (MapToEdifactOrdersTasklet#getPoLineQuery and #getVendorAccountFilter on master, MODEXPW-628). An integration applies to a line when the acquisition method is in its defaultAcquisitionMethods and the account filter matches:

  • a non-default integration takes the lines whose vendor account is in its accountNoList, or every line of the vendor when the list is empty
  • the default integration takes every line whose vendor account is not listed on another integration of the vendor

toggleAutomaticExport sets the checkbox to whether any integration applies. For EDI integrations with account numbers the result is the same as before. The one difference follows the backend: a line whose account is on no list is now flagged for export when the vendor has a default integration.

Only EDIFACT_ORDERS_EXPORT configs take part. Claiming configs store their settings in the same vendorEdiOrdersExportConfig structure, and the current lookup on master searches all configs of the vendor by account number without checking the type. So a claiming config with a matching account number decides the checkbox today, by its own acquisition methods.

The hint renders one of three states: the name of the single matching integration with its transmission method below the checkbox, an info popover listing several matches, or a warning icon when nothing matches while the checkbox is on. Several matches are not an error in the backend: the first scheduled job sets lastEDIExportDate and the others skip the line, so the popover says so. The hint is hidden while the checkbox is off, for manual orders (never exported, see UIOR-890), while the configs load, and in order templates, which pass no configs. The detail view fetches the configs only when the hint can show something.

Deliberately not part of the hint: lastEDIExportDate and the workflow status. The hint says which integration applies to the line, not whether the next run will take it.

Screenshots

show matching integration

matching-integration

no matching integration

no-matching-integration

multiple matching integrations

multiple-integrations

Refs UIOR-1556

Pre-Merge Checklist

Before merging this PR, please go through the following list and take appropriate actions.

  • I've added appropriate record to the CHANGELOG.md
  • Does this PR meet or exceed the expected quality standards?
    • Code coverage on new code is 80% or greater
    • Duplications on new code is 3% or less
    • There are no major code smells or security issues
  • Does this introduce breaking changes?
    • If any API-related changes - okapi interfaces and permissions are reviewed/changed correspondingly
      • No interface or permission changes.
    • There are no breaking changes in this PR.

The "Automatic export" checkbox was calculated account-first, which
predates integrations without account numbers. Mirror the rule of
mod-data-export-worker instead: a non-default integration with an empty
account list matches all of the vendor's lines, and the default
integration excludes only accounts listed on other integrations.

Match ordering integrations only. Claiming integrations share the
vendorEdiOrdersExportConfig shape and were matched as well, so a
claiming config could toggle the checkbox and narrow the default
ordering integration.

Expose getApplicableOrderingIntegrations so the UI can show which
integrations apply.
The checkbox only tells the orderer that a line is flagged for export,
not which integration picks it up. Add a read-only hint next to the
checkbox in the edit form and the detail view: the integration name
with its transmission method for a single match, an info popover
listing the candidates for several matches, and a warning icon when
no integration matches while the checkbox is on.

The detail view fetches the integration configs only when the hint
can show something and hides it while they load, so the warning does
not flash before the data arrives.

Manual orders are never exported, so the hint is hidden for them and
the checkbox is no longer auto-toggled. The detail view now carries
the same explanatory popover as the edit form.
@thomas-sc thomas-sc self-assigned this Oct 15, 2026
@github-actions

Copy link
Copy Markdown

Jest Unit Test Results

    1 files  ± 0    313 suites  +1   6m 54s ⏱️ -1s
1 225 tests +29  1 217 ✅ +29  8 💤 ±0  0 ❌ ±0 
1 233 runs  +29  1 225 ✅ +29  8 💤 ±0  0 ❌ ±0 

Results for commit 6513cc0. ± Comparison against base commit 0a365d1.

@sonarqubecloud

Copy link
Copy Markdown

@thomas-sc
thomas-sc marked this pull request as ready for review October 21, 2026 05:53
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