Autotask: declare shape:string on lookup columns to fix filter type inference (PLUG-4740) - #129
Conversation
…ference sourceId + objectPropertyPath lookup columns (assignedResourceName, companyName, etc.) had no declared shape, so SquaredUp inferred their filter type by sampling resolved values. A numeric-looking sample flipped the whole column to numeric filtering, dropping string operators and breaking matches against real string rows (PLUG-4740). Declaring shape:string explicitly on all 13 affected lookup columns across tickets, contractStatus, companies and resourceUtilisation streams bypasses the sampling and fixes both symptoms at the plugin level. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Essentials Run ID: 📒 Files selected for processing (1)
Included review availability: 3 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. 📝 WalkthroughWalkthroughThe AutoTask data stream metadata now declares explicit string shapes for selected fields. The plugin metadata version changes from ChangesAutoTask metadata updates
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The AutoTask metadata version is updated to 1.0.7 alongside the string-shape declarations, with no current merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
# Conflicts: # plugins/AutoTask/v1/dataStreams/contractStatus.json # plugins/AutoTask/v1/dataStreams/tickets.json
Required since main already moved to 1.0.6 after merging separate AutoTask changes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
🧩 Plugin PR Summary📦 Modified Plugins
📋 Results
🔍 Validation Details✅
|
📋 Summary
Declares
"shape": "string"on everysourceId+objectPropertyPathlookup column in the Autotask plugin (e.g.assignedResourceName,companyName,contactName), so SquaredUp no longer infers the column's filter type by sampling resolved values.Scope note: this fixes the filter-operator-type symptom only (filters on these columns now correctly offer string operators like Contains/Equals instead of numeric ones). It does not fix actual filter matching on these columns — live testing showed Equals/Contains still fail to match the resolved name, because filter execution compares against the underlying raw
sourceIdproperty rather than theobjectPropertyPath-resolved value. That's a separate, platform-side gap tracked on PLUG-4740 and not fixable from plugin JSON.🔗 Related issue(s)
🧩 Plugin details
🧪 Testing
PLUG-4740 (filed after review of a live Autotask deployment) identified that lookup columns resolved via
sourceId+objectPropertyPath(e.g.assignedResourceName) had no declaredshape. SquaredUp infers a column's filter type by sampling a couple of resolved values; if a sample happened to look numeric, the whole column was misclassified as numeric, dropping the "Contains" filter operator.Deployed this branch to
dev-demoasAutotask-lookupfixand ransquaredup testagainst a live, authenticated Autotask connection for all 4 changed streams:tickets— scoped to "ABLE Manufacturing HQ" (the company with an active ticket): 1 row returned,assignedResourceName="Allison Johnson"withshapeName/targetShapeName/valueShapeNameallshape_string. Re-ran scoped to Cisco Systems over the same window → 0 rows, confirming the scope filter genuinely isolates per-company data rather than matching everything.contractStatus— scoped to ABLE Manufacturing HQ: 6 rows,companyNameconfirmedshape_string. Cisco Systems → 0 rows, again confirming real per-object scoping (not anundefined === undefinedfalse match).companies(unscoped) —ownerResourceName="Autotask Administrator", confirmedshape_string.resourceUtilisation(unscoped) — request succeeds (200 OK) with the correct 30-day window resolved; no time entries exist in this tenant for that window, so shape couldn't be asserted against a live row, but the endpoint/config itself is unaffected by the change.All requests succeeded with no errors, and every lookup column now resolves as
shape_stringend-to-end rather than being inferred from sampled values (confirming the operator-type symptom is fixed). Also confirmed withsquaredup validate --json(all 13 data streams valid).Separately, testing an actual filter (Equals/Contains on
assignedResourceName) against the live deployment showed the match still fails, returning/matching against the rawassignedResourceIDinstead of the resolved name. This is the remaining platform-side gap described above and in the PLUG-4740 comment thread — not something this PR can address.Does this PR introduce any breaking changes?
📚 Documentation
✅ Checklist
Summary by CodeRabbit