Skip to content

feat: Regular Time entry support with name resolution helpers#155

Merged
asachs01 merged 1 commit intomainfrom
feat/regular-time-entries
Mar 15, 2026
Merged

feat: Regular Time entry support with name resolution helpers#155
asachs01 merged 1 commit intomainfrom
feat/regular-time-entries

Conversation

@asachs01
Copy link
Collaborator

Summary

Adds convenience methods for creating non-ticket (Regular) time entries:

  • TimeEntries.createDirect() — POST to /TimeEntries without parent scope
  • TimeTrackingClient.createRegularTimeEntry() — creates Regular Time entries, auto-sets timeEntryType=5 (Activity), handles itemId response format
  • CoreClient.searchResources() / resolveResourceByName() — search and resolve resources by full name (splits first/last for accurate matching)
  • FinancialClient.getInternalBillingCodes() / resolveInternalBillingCodeByName() — get and resolve BillingCodes with useType=3 (internal allocation codes)

Key Autotask API discoveries documented in code

  • Regular Time entries require internalBillingCodeID (NOT billingCodeID)
  • Only BillingCodes with useType=3 are valid for Regular Time categories (Internal Meeting, Training, PTO, etc.)
  • timeEntryType=5 (Activity) is required for Regular Time
  • The API returns {itemId: N} for creates, not {id: N}

Relation to PR #153

This PR is a clean rebase of PR #153 by @shaank0 onto main, keeping main's correct gzip compression implementation (rather than removing gzip support entirely).

Test plan

  • Verify createDirect() POSTs to /TimeEntries without parent scoping
  • Verify createRegularTimeEntry() sets timeEntryType=5 automatically
  • Verify resolveResourceByName("Will Spence") correctly splits and resolves
  • Verify resolveInternalBillingCodeByName("Internal Meeting") returns correct ID
  • Verify getInternalBillingCodes() only returns useType=3 codes

🤖 Generated with Claude Code

Adds convenience methods for creating non-ticket time entries:

- TimeEntries.createDirect() — POST /TimeEntries without parent scope
- TimeTrackingClient.createRegularTimeEntry() — creates Regular Time
  entries with timeEntryType=5 (Activity), requires internalBillingCodeID
- CoreClient.searchResources() / resolveResourceByName() — search and
  resolve resources by full name with first/last split logic
- FinancialClient.getInternalBillingCodes() / resolveInternalBillingCodeByName()
  — fetch and resolve BillingCodes with useType=3 (internal allocation codes)

Key Autotask API discoveries documented in code:
- Regular Time requires internalBillingCodeID (NOT billingCodeID)
- Only BillingCodes with useType=3 are valid for Regular Time categories
- API returns { itemId: N } for creates, not { id: N }
- timeEntryType=5 (Activity) is required for Regular Time

Rebased from shaank0/feat/regular-time-entries (PR #153) onto main,
keeping main's gzip compression implementation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@asachs01 asachs01 merged commit 8909a43 into main Mar 15, 2026
0 of 5 checks passed
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