[followup] Finalize resolveStoreAssetReference to the working AQL variant #2

Closed
opened 2026-07-01 16:06:32 -04:00 by jmcqueen · 1 comment
Owner

Blocked on #1. Once the probe reports a winning variant, lock resolveStoreAssetReference in src/services/jiraService.js to that exact query shape (attribute name vs Name, padded vs unpadded, attribute[<id>] form) and remove the fallback loop.

Acceptance:

  • Single AQL call per store lookup, not a loop
  • Clear error message if the store isn't found
  • probeAssetsForStore stays as-is for diagnostics
Blocked on #1. Once the probe reports a winning variant, lock `resolveStoreAssetReference` in `src/services/jiraService.js` to that exact query shape (attribute name vs `Name`, padded vs unpadded, `attribute[<id>]` form) and remove the fallback loop. Acceptance: - Single AQL call per store lookup, not a loop - Clear error message if the store isn't found - `probeAssetsForStore` stays as-is for diagnostics
jmcqueen added this to the v1: Jira lifecycle GA milestone 2026-07-01 16:06:32 -04:00
jmcqueen added the
followup
label 2026-07-01 16:06:32 -04:00
Author
Owner

Closing without code change.

Empirical verification from an admin account (see #1 update) proves that the AQL variant already in resolveStoreAssetReference is the correct one:

objectTypeId = 109 AND "Store Number" = "00514"
→ total=1, id=75857 (ASSET-75857, label "00514", type 109 "Store Address / Hierarchy")

That's exactly the query resolveStoreAssetReference generates today for storeNumber=514 (in services/jira/assets.js, first entry of the queries array). The 5-digit zero-padded normalization is also correct — store 514's label is stored as "00514".

So there's no finalization to do. The moment #1's permission block clears, this code path just works. Confirmed schema id, object type id, attribute name, and value format all match what we already have configured.

Reopening only makes sense if #1's fix reveals we were wrong about one of those. In that case this can be reopened with the corrected variant.

See #1 for the full evidence and the admin action still pending.

**Closing without code change.** Empirical verification from an admin account (see #1 update) proves that the AQL variant already in `resolveStoreAssetReference` is the correct one: ``` objectTypeId = 109 AND "Store Number" = "00514" → total=1, id=75857 (ASSET-75857, label "00514", type 109 "Store Address / Hierarchy") ``` That's exactly the query `resolveStoreAssetReference` generates today for `storeNumber=514` (in `services/jira/assets.js`, first entry of the `queries` array). The 5-digit zero-padded normalization is also correct — store 514's label is stored as `"00514"`. So there's no finalization to do. The moment #1's permission block clears, this code path just works. Confirmed schema id, object type id, attribute name, and value format all match what we already have configured. Reopening only makes sense if #1's fix reveals we were wrong about one of those. In that case this can be reopened with the corrected variant. See #1 for the full evidence and the admin action still pending.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: jmcqueen/wxccai#2
No description provided.