Skip to content

v0.7.0

Release Date: 2026-07-20

Overview

This release fixes two long-standing data gaps in the SDK: ListIdeas no longer returns Votes: 0 and empty Categories for every idea, and GetInitiative decodes CustomFields directly instead of relying on a manual raw-HTTP workaround.

Highlights

  • Idea votes, categories, and score - ListIdeas now populates Votes, Categories, and the new Score field by default
  • Initiative custom fields - GetInitiative decodes CustomFields via the generated client, consistent with CreateInitiative/UpdateInitiative

Installation

go get github.com/grokify/aha-go@v0.7.0

What's New

Idea votes, categories, and score

Aha's GET /ideas list endpoint omits votes, categories, and score unless the request explicitly opts in via a fields query parameter. Every ListIdeas call previously came back with Votes: 0 and Categories: [] regardless of the account's actual data. ListIdeas now requests these fields by default:

ideas, err := client.ListIdeas(ctx, aha.WithIdeaSort("popular"))
for _, idea := range ideas.Ideas {
    fmt.Printf("%s: %d votes, categories=%v\n", idea.ReferenceNum, idea.Votes, idea.Categories)
}

Use WithIdeaFields to override the optional field set (the fields required to decode Idea's core struct fields are always included regardless):

ideas, err := client.ListIdeas(ctx, aha.WithIdeaFields("votes"))

Initiative custom fields

GetInitiative now decodes CustomFields the same way Feature and Idea already do, in a single API call:

initiative, err := client.GetInitiative(ctx, "SAVIN-123")
for _, cf := range initiative.CustomFields {
    fmt.Printf("%s (%s): %v\n", cf.Name, cf.Type, cf.Value)
}

CreateInitiative and UpdateInitiative now populate CustomFields consistently as well, since all three route through the same initiativeFromAPI conversion.

Bug Fixes

Ideas missing votes/categories/score

ListIdeas requests votes, categories, score, and the rest of Idea's optional fields by default. Category.ParentID is also now correctly nullable, matching the null Aha returns for top-level categories with no parent.

Initiative custom fields workaround removed

The previous fix populated CustomFields via a second raw HTTP call to GET /initiatives/{id} that silently discarded any error, and only ran inside GetInitiative — leaving CreateInitiative/UpdateInitiative with an always-empty CustomFields. The Initiative OpenAPI schema now declares custom_fields (mirroring Feature/Idea), so the generated client decodes it directly with no extra request and normal error propagation.

New SDK Methods

Method/Field Description
Idea.Score New field populated from the Aha API
WithIdeaFields ListIdeasOption to override the optional idea fields requested

Upgrade Notes

This is a backward-compatible release. No breaking changes from v0.6.0. ListIdeas callers will start seeing populated Votes/Categories/Score without any code changes.

Commits

Hash Description
067ab7f docs(roadmap): mark custom field support complete
70fbba3 test(initiative): cover custom fields decode in GetInitiative
45642c1 feat(initiative): decode custom fields via generated client
dfcee6f feat(api): regenerate client for initiative custom_fields
916dd73 test(ideas): cover default and overridden fields params in ListIdeas
5a03160 feat(ideas): request votes, categories, and score by default in ListIdeas
c7aa90a feat(api): regenerate client for idea fields param, score, and nullable category parent_id
9ad0c44 chore(deps): Bump actions/setup-go from 6 to 7

Contributors