Repository navigation
Conversation
Plane added a RATING work item property type (makeplane/plane-ee#10929). The SDK's property models rejected it, so listing or retrieving properties, or a work item type's properties, raised ValidationError in any workspace with one. - Add RATING to the v1 PropertyType enum and PropertyTypeEnum Literal, and to both v2 WorkItemPropertyType Literals. - WorkItemPropertyValueDetail.value accepts int, so a rating of 4 no longer reads back as 4.0. - Document the rating value (integer 1-5, cleared with DELETE) on CreateWorkItemPropertyValue. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dheeru0198
left a comment
There was a problem hiding this comment.
Checked against the server: rating values come back as integers, so the int in the value type is needed. Merge after makeplane/plane-ee#10929.
What
property_type: "RATING". Listing or retrieving properties, or a work item type's properties, raisedValidationErrorin any workspace that had a rating property. A v1 rating value of4read back as4.0.RATINGparses on v1 (PropertyType,PropertyTypeEnum) and on v2 (bothWorkItemPropertyTypeLiterals), and a rating value stays anint.Merge order
Where to look
plane/models/enums.py,plane/models/v2/work_item_properties.py,plane/models/v2/work_item_types.py: the new enum and Literal member.plane/models/work_item_properties.py:WorkItemPropertyValueDetail.valuegainsint, and theCreateWorkItemPropertyValuedocstring documents ratings (integer 1–5, cleared with DELETE).No change needed for writes (
CreateWorkItemPropertyValue.valuealready takesint), v2custom_fields(dict[str, object]), the type schema'sminimum/maximum, or the generated constants.Proof
int, and a decimal staysfloatCreateWorkItemProperty(property_type="RATING")serializespytest tests/v2passes; the offline tests intests/unit/test_work_item_properties.pypass. The live suites are skipped (no env).mainare unchanged: black onenums.pyand the unit test file, 3 ruff errors in the unit test file, 56 mypy errors.Not in this PR (follow-ups)
WorkItemPropertyTypeEnumhas 14 types). v1 lacksEXTERNAL_DROPDOWN/SLIDER; both v2WorkItemPropertyTypeLiterals lackCASCADING/EXTERNAL_DROPDOWN/SLIDER. One property of a missing type makes the wholelistpage fail withValidationError. This is already the case today for external dropdown properties on v1.WorkItemPropertyType/WorkItemPropertyRelationTypeare defined in bothplane/models/v2/work_item_properties.pyandplane/models/v2/work_item_types.py. Generating them from the golden inscripts/generate_v2_constants.pywould close both items above.tests/unit/test_customers.pyparametrizes onlyFORMULA/CASCADING. AddingRATINGwould pin the customer set against drift (theCustomerPropertyTypedocstring is updated in this PR).🤖 Generated with Claude Code
Summary by CodeRabbit