You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[GIT-428] fix: record activity when transferring work items between cycles - #10410
transfer_cycle_issues sent "created_cycle_issues": [] (a Python list) inside the JSON-serialized current_instance. The activity task runs json.loads() on that value, so it received a list instead of a string and raised TypeError: the JSON object must be str, bytes or bytearray, not list, swallowing the whole activity write. Sending "[]" (a JSON string) matches the other callers (which use serializers.serialize("json", ...)) and lets create_cycle_issue_activity parse it.
Improved consistency in cycle activity data when issues are transferred between cycles. This helps keep activity records in a predictable format, reducing the chance of inconsistent data appearing in related cycle views.
No actionable comments were generated in the recent review.
Walkthrough
The cycle transfer utility now sets created_cycle_issues to the string "[]" before serializing the activity payload to JSON.
Changes: Cycle transfer activity
Layer / File(s)
Summary
Set the activity payload value apps/api/plane/utils/cycle_transfer_issues.py
The activity payload sets created_cycle_issues to the string "[]" instead of an empty list. JSON serialization therefore emits a string value. This matches the value format expected by the activity task.
makeplane/plane#10384: Changes cycle activity handling for created_cycle_issues and addresses the same transfer activity failure.
Merge Risk: Minimal · up to 7564d
This fixes missing activity records when work items are transferred between cycles by sending the payload in the format the activity task expects. The change is small and I found no concrete merge risk.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: recording work-item activity when work items move between cycles. It also names the fix type and the issue ID. The raw summary shows a one-line change that sends "[]" …
Description check
The description follows the repository template. It gives a clear Description that explains the root cause (a Python list where the activity task expects a JSON string) and the fix. It marks the Bug f…
Linked Issues check
Issue #10383 requires that moving work items to another cycle records the move in the work item activity. The root cause in the issue is that transfer_cycle_issues in apps/api/plane/utils/cycle_transf…
Out of Scope Changes check
The whole-PR summary lists one changed file, apps/api/plane/utils/cycle_transfer_issues.py, with a single-line change to the activity payload value for created_cycle_issues. This file is the transfer …
Full details: Title check
Explanation
The title names the main change: recording work-item activity when work items move between cycles. It also names the fix type and the issue ID. The raw summary shows a one-line change that sends "[]" as a JSON string instead of a list, which fixes the TypeError that blocked the activity write. The title describes this fix at the level of user-visible behavior, so it matches the changeset.
Full details: Description check
Explanation
The description follows the repository template. It gives a clear Description that explains the root cause (a Python list where the activity task expects a JSON string) and the fix. It marks the Bug fix type. It lists test scenarios and links the issue in References. The template's Screenshots section is absent, but it applies only when relevant to the change, so this gap is not critical. The description is mostly complete.
Full details: Linked Issues check
Explanation
Issue #10383 requires that moving work items to another cycle records the move in the work item activity. The root cause in the issue is that transfer_cycle_issues in apps/api/plane/utils/cycle_transfer_issues.py passes created_cycle_issues as a Python list, so create_cycle_issue_activity's json.loads() raises TypeError and issue_activity writes no rows. The whole-PR summary states that this PR changes that value to the string "[]" (+1/-1 in that file), which matches the other callers that send serializers.serialize("json", ...) output. This targets the stated root cause for the transfer path in #10383. Limitation: the repository diff tool was unavailable (changed blobs missing), and the file read at head was truncated before the changed line, so the exact line was confirmed only from the PR summary, not from source at head. The automated tests for this path were not identified in the evidence. The issue's manual reproduction steps are non-coding and were not assessed.
Full details: Out of Scope Changes check
Explanation
The whole-PR summary lists one changed file, apps/api/plane/utils/cycle_transfer_issues.py, with a single-line change to the activity payload value for created_cycle_issues. This file is the transfer path named in #10383, and the change is the fix the issue describes. No unrelated change appears in the supplied evidence. Limitation: the diff tool was unavailable, so the complete changed-file list was taken from the summary and not verified against the git diff.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 07e1841d-25c4-4fdb-9a89-fee7b3188bb7
Commits
Reviewing files that changed from the base of the PR and between 723bb17 and 7564da1.
Files selected for processing: 1
apps/api/plane/utils/cycle_transfer_issues.py
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
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
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.
Description
transfer_cycle_issuessent"created_cycle_issues": [](a Python list) inside the JSON-serializedcurrent_instance. The activity task runsjson.loads()on that value, so it received a list instead of a string and raisedTypeError: the JSON object must be str, bytes or bytearray, not list, swallowing the whole activity write. Sending"[]"(a JSON string) matches the other callers (which useserializers.serialize("json", ...)) and letscreate_cycle_issue_activityparse it.Fixes #10383.
Type of Change
Test Scenarios
TypeError.References
Summary by CodeRabbit