Skip to content

Autotask: declare shape:string on lookup columns to fix filter type inference (PLUG-4740) - #129

Merged
TimWheeler-SQUP merged 3 commits into
mainfrom
work/tw/PLUG-4740
Sep 9, 2026
Merged

Autotask: declare shape:string on lookup columns to fix filter type inference (PLUG-4740)#129
TimWheeler-SQUP merged 3 commits into
mainfrom
work/tw/PLUG-4740

Conversation

@TimWheeler-SQUP

@TimWheeler-SQUP TimWheeler-SQUP commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

📋 Summary

Declares "shape": "string" on every sourceId + objectPropertyPath lookup 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 sourceId property rather than the objectPropertyPath-resolved value. That's a separate, platform-side gap tracked on PLUG-4740 and not fixable from plugin JSON.

🔗 Related issue(s)

🧩 Plugin details

  • Plugin name: Autotask
  • Type of change:
    • Bug fix
    • New datastream
    • Enhancement to existing datastream
    • Performance improvement
    • Documentation / metadata / logo
    • Other (please describe):

🧪 Testing

PLUG-4740 (filed after review of a live Autotask deployment) identified that lookup columns resolved via sourceId + objectPropertyPath (e.g. assignedResourceName) had no declared shape. 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-demo as Autotask-lookupfix and ran squaredup test against 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" with shapeName/targetShapeName/valueShapeName all shape_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, companyName confirmed shape_string. Cisco Systems → 0 rows, again confirming real per-object scoping (not an undefined === undefined false match).
  • companies (unscoped) — ownerResourceName = "Autotask Administrator", confirmed shape_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_string end-to-end rather than being inferred from sampled values (confirming the operator-type symptom is fixed). Also confirmed with squaredup 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 raw assignedResourceID instead 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.

⚠️ Breaking changes

Does this PR introduce any breaking changes?

  • No
  • Yes (please describe):

📚 Documentation

  • Documentation updated
  • No documentation changes needed

✅ Checklist

  • This PR changes a single plugin only
  • No secrets or credentials included
  • Plugin, datastream and UI naming follow SquaredUp guidelines
  • I agree to the Code of Conduct

Summary by CodeRabbit

  • Bug Fixes
    • Improved data consistency by explicitly identifying several AutoTask metadata fields as text values.
    • Updated ticket status, priority, company, resource, and related reference fields for more reliable handling and display.
    • Improved consistency across company, contract status, resource utilisation, and ticket data streams when processing text-based values.

…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>
@TimWheeler-SQUP
TimWheeler-SQUP requested a review from a team September 7, 2026 12:47
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Essentials

Run ID: b23a9920-bd09-4a74-b7c3-3ffe0a031843

📥 Commits

Reviewing files that changed from the base of the PR and between 717f12f and 178476c.

📒 Files selected for processing (1)
  • plugins/AutoTask/v1/metadata.json

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.


📝 Walkthrough

Walkthrough

The AutoTask data stream metadata now declares explicit string shapes for selected fields. The plugin metadata version changes from 1.0.6 to 1.0.7.

Changes

AutoTask metadata updates

Layer / File(s) Summary
String shape declarations
plugins/AutoTask/v1/dataStreams/companies.json, plugins/AutoTask/v1/dataStreams/contractStatus.json, plugins/AutoTask/v1/dataStreams/resourceUtilisation.json, plugins/AutoTask/v1/dataStreams/tickets.json
Selected company, contract, resource, ticket, status, priority, and related name fields now explicitly use the string shape. Existing mappings and configuration remain unchanged.
Plugin metadata version update
plugins/AutoTask/v1/metadata.json
The plugin metadata version changes from 1.0.6 to 1.0.7.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 17847

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)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the Autotask change and its purpose: declaring string shapes on lookup columns to fix filter type inference.
Description check ✅ Passed The description is complete and relevant. It documents the change, scope, related issue, plugin details, testing, breaking-change status, documentation status, and checklist items.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

TimWheeler-SQUP and others added 2 commits September 8, 2026 21:29
# 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>
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

🧩 Plugin PR Summary

📦 Modified Plugins

  • plugins/AutoTask/v1

📋 Results

Step Status
Scope & version ✅ Passed
Validation ✅ Passed
Deployment 🚀 Deployed

🔍 Validation Details

autotask
{
  "valid": true,
  "pluginName": "autotask",
  "pluginType": "cloud",
  "summary": {
    "Data Streams": 13,
    "Import Definitions": 1,
    "Correlation Rules": 0,
    "UI Configuration": true,
    "Has Icon": true,
    "Has Default Content": true,
    "Config Validation": true,
    "Custom Types": true
  }
}

@TimWheeler-SQUP
TimWheeler-SQUP merged commit c39158a into main Sep 9, 2026
1 check passed
@TimWheeler-SQUP
TimWheeler-SQUP deleted the work/tw/PLUG-4740 branch September 9, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants