Skip to content

Feat: Project - add isBillable field#93

Merged
seanogdev merged 3 commits into
mainfrom
seanogrady/project-is-billable
Jun 11, 2026
Merged

Feat: Project - add isBillable field#93
seanogdev merged 3 commits into
mainfrom
seanogrady/project-is-billable

Conversation

@seanogdev

Copy link
Copy Markdown
Contributor

Description

Adds IsBillable to the projects.Project struct. The v3 API returns isBillable (the project's billable-by-default setting for time logs) on both the project list and single project endpoints, but the struct didn't model it, so anything decoding into projects.Project silently drops the field.

We hit this on the Teamwork MCP server: the twprojects-get_project tool re-marshals this struct, so the billable setting never made it back to the model. twprojects-list_projects passes the raw API response through and already includes it, which made the gap easy to miss.

Pointer field and additive, so no breaking change.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Testing

  • Tests pass locally (go test -v ./...)
  • Added/updated tests for new functionality

The projects package tests are integration-only (skipped without a live engine) with no fixture decode tests to extend. I verified a decode/re-marshal round trip keeps the field, since that's the path that was dropping it.

Checklist

  • Code follows project style guidelines
  • Self-reviewed the code
  • Added necessary documentation
  • No new warnings or errors

@seanogdev seanogdev requested a review from a team as a code owner June 11, 2026 17:14
Comment thread projects/calendar_test.go

// Only one blocked time calendar is allowed per user, so a leftover from an
// interrupted run makes the "all fields" case fail until it is removed.
deleteBlockedTimeCalendar(t)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I was frequently manually deleting the blocked calendar instance in my test installation when tests failed to do so 😂

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah so it wasn't me!!

@seanogdev seanogdev merged commit 3609e22 into main Jun 11, 2026
3 checks passed
@seanogdev seanogdev deleted the seanogrady/project-is-billable branch June 11, 2026 17:33
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.

2 participants