fix: surface initial fields in lists.items.create method arguments#1600
Open
zimeg wants to merge 7 commits into
Open
fix: surface initial fields in lists.items.create method arguments#1600zimeg wants to merge 7 commits into
zimeg wants to merge 7 commits into
Conversation
The `initial_fields` parameter was being sent as `intial_fields` (missing second 'i'), causing list items to be created without their initial field values. Fixes #1599 Co-Authored-By: Claude <[email protected]>
Adds regression test for #1599 — ensures the created item's fields are populated when initialFields is provided. Co-Authored-By: Claude <[email protected]>
Verify the exact column_id and rich_text content are returned on the created item, not just that fields are non-empty. Co-Authored-By: Claude <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1600 +/- ##
============================================
- Coverage 73.33% 73.32% -0.01%
- Complexity 4521 4522 +1
============================================
Files 478 478
Lines 14300 14300
Branches 1490 1490
============================================
- Hits 10487 10486 -1
- Misses 2922 2929 +7
+ Partials 891 885 -6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
Co-Authored-By: Claude <[email protected]>
zimeg
commented
Jun 10, 2026
zimeg
left a comment
Member
Author
There was a problem hiding this comment.
🪐 A comment for the reviewers!
Comment on lines
+164
to
+167
| assertThat(createItemResponse.getItem().getFields(), is(notNullValue())); | ||
| assertThat(createItemResponse.getItem().getFields().size(), is(1)); | ||
| assertThat(createItemResponse.getItem().getFields().get(0).getColumnId(), is(taskNameColId)); | ||
| assertThat(createItemResponse.getItem().getFields().get(0).getText(), is("Test task item")); |
Member
Author
There was a problem hiding this comment.
🪬 note: We now confirm the fields used above:
[DEBUG] createItemResponse item=ListRecord(id=Rec0B9VCSAABE, listId=F0B9KD6NECB, fields=[ListRecord.Field(key=task_name, columnId=Col0B9TKAUTND, value=[{"type":"rich_text","block_id":"h2z2t","elements":[{"type":"rich_text_section","elements":[{"type":"text","text":"Test task item"}]}]}], text=Test task item, richText=[RichTextBlock(type=rich_text, elements=[RichTextSectionElement(type=rich_text_section, elements=[RichTextSectionElement.Text(type=text, text=Test task item, style=null)])], blockId=h2z2t)], messages=null, message=null, number=null, select=null, date=null, user=null, attachment=null, checkbox=null, email=null, phone=null, channel=null, rating=null, timestamp=null, link=null, reference=null)], dateCreated=1781134963, createdBy=U09KU686163, threadTs=null, position=null, updatedTimestamp=1781134963, updatedBy=U09KU686163, viewPositions=null, platformRefs=null, isSubscribed=null, saved=null, savedFields=null)
mwbrooks
approved these changes
Jun 11, 2026
| if (req.getInitialFields() != null) { | ||
| String json = getJsonWithGsonAnonymInnerClassHandling(req.getInitialFields()); | ||
| form.add("intial_fields", json); | ||
| form.add("initial_fields", json); |
Member
There was a problem hiding this comment.
praise: Nice catch 🎉 Silent param-drops are the worst flavour of bug because nothing 4xxs and the request just succeeds with the field missing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix typo in
RequestFormBuilder.toForm(SlackListsItemsCreateRequest)whereinitial_fieldswas being sent asintial_fields(missing second 'i'), causing list items to be created without their initial field values set.Fixes #1599
Category
Example
Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.