Repository navigation
Conversation
Leantime's addTicket/updateTicket read the assignee from `editorId`, not `assignedTo`, so the `assignedTo` parameter was silently dropped (the ticket was created/updated with no assignee). Translate assignedTo -> editorId in both client methods. Note: `userId` (the author/owner) is server-enforced to the API-key user and cannot be overridden via the API, so create_ticket's `user_id` parameter has no effect on the resulting ticket's author. Documented this in the tool schema; to assign a ticket, use `assignedTo`. Verified live against Leantime 3.9.8: create_ticket(assignedTo=1) and update_ticket(assignedTo=1) both now set editorId correctly. Co-Authored-By: Claude <noreply@anthropic.com>
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.
Problem
create_ticketandupdate_ticketexpose anassignedToparameter to set a ticket's assignee, but the value is silently dropped — tickets are created/updated with no assignee (editorIdstays empty), with no error returned.Root cause
Both methods spread
assignedToverbatim into the JSON-RPCvaluespayload via**kwargs:But Leantime's
Tickets.Tickets.addTicket/updateTicketread the assignee from theeditorIdfield, notassignedTo. The unrecognized key is ignored, so the assignment is lost.Fix
Translate
assignedTo→editorIdin bothcreate_ticketandupdate_ticket(pop it fromkwargs, setvalues["editorId"]). The public tool parameter keeps the nameassignedTo, so this is fully backward compatible — no schema or caller changes.Side note:
userId(author)While diagnosing this I confirmed that
userId(the ticket author/owner) is server-enforced: Leantime ignores theuserIdvalue invaluesand sets the author to the API-key user, regardless of what is passed. That's server behavior and out of scope for this PR, but I updated theuser_idtool description to document it so callers aren't misled into thinking it sets the author.Verification
Tested end-to-end against Leantime 3.9.8 via the JSON-RPC API:
create_ticket(..., assignedTo=1)→ resulting ticket haseditorId: 1(was""before)update_ticket(id, project, assignedTo=1)→editorIdset to1(was""before)🤖 Generated with Claude Code