* fix: prevent AttributeError when creating state with reserved 'Triage' name
Reject state creation requests with the name "Triage" early since it's
a reserved state name for the intake system. Also add a None guard in the
IntegrityError handler to prevent crashes when the conflicting state
can't be found via the default manager.
https://claude.ai/code/session_017zjpP6MvrU4oWcTQnmoMjH
* refactor: move Triage name validation to serializers for consistent enforcement
Move the reserved "Triage" name check from the view-level POST handler
into both StateSerializer classes (API and App) as a validate_name method.
This ensures the validation applies consistently to both create (POST)
and update (PATCH) flows, preventing clients from renaming existing
states to "Triage".
https://claude.ai/code/session_017zjpP6MvrU4oWcTQnmoMjH
---------
Co-authored-by: Claude <[email protected]>
* [WEB-5483] fix: update order clause in grouped chart response for widget graph plot
Modified the order clause in the build_grouped_chart_response function to dynamically set the ordering based on the id_field. This change allows for more flexible data sorting in non-estimate charts, improving the accuracy of the grouped chart response.
* fix: reverted mistakenly removed comment
* fix: enhance S3 client initialization in create_bucket command
Updated the S3 client initialization logic in the create_bucket management command to support both direct AWS credentials and IRSA (IAM Role for Service Account) paths. This change improves flexibility in how the application connects to S3, allowing for better integration with different deployment environments.
* Revert "fix: enhance S3 client initialization in create_bucket command"
This reverts commit 9726800d7c8358ebb496ec88d21a92de135a14c4.
* fix: improve S3 client initialization logic in storage settings
Refactored the S3 client initialization in the S3Storage class to handle cases where AWS credentials may not be provided. This change allows the application to create an S3 client using only the region and endpoint URL, enhancing flexibility for different deployment environments.
* Add vitest test suite for runInIsolate in node-runner
Adds 9 tests covering AutomationEventInput data flow, PlaneClient
injection, Functions library, execution timeout, domain-restricted
fetch, ENV exposure, and missing-main error handling.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* Add TypeScript parsing support and replace console with structured logger
- Use acorn-typescript plugin for AST-based code validation and function
detection so user scripts can include TypeScript syntax
- Build user code as index.ts instead of index.js via esbuild
- Replace all console.log/error/warn calls with @plane/logger
- Add logger middleware to Express server
- Add dd-trace initialization via tracer module
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: split tsconfig into build and base configs for test compatibility
Move rootDir/outDir into tsconfig.build.json so the base tsconfig.json
can include tests/**/* for ESLint and IDE support without breaking tsc.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* remove environment variables from scripts
* update tsconfig for tests
* fix bug in scripts UI to render code properly
* add 6 system functions and inject Plane/workspaceSlug into function factory
Expand buildFunctionsLibrary to pass Plane client and workspaceSlug into
the function factory so system functions can call the Plane SDK. Populate
the system_functions fixture with httpRequest, postToSlack, getChildren,
getSiblings, addComment, and addLabel.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: add created_at/updated_at to system functions fixture
Django's auto_now_add/auto_now fields are not auto-populated when
loading fixtures via loaddata, causing a NOT NULL constraint violation.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* add parent_id filter and use advancedSearch in system functions
Add parent_id filter to ExtendedIssueFilterSet so work items can be
queried by parent. Update getChildren and getSiblings system functions
to use Plane.workItems.advancedSearch with parent_id filter instead of
the list endpoint which does not support parent filtering.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* Revert "feat: add pagination support to WorkItemAdvancedSearchEndpoint"
This reverts commit 9820a1d16e571c14539c7a7139aa269df9baece4.
* add system script: mark parent as done if all children are done
Populates system_scripts fixture with a script that triggers when a
work item enters a completed state group, checks all siblings, and
updates the parent to completed if every child is done.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* Add script - Create linked work item in another project on state change
* fix: form data + title width
* fix: implemented full screen editor + handled is_system
* fix: handled is_system
* disable error highlighting in code editor
* feat: add redirect url support for runner
- add is_internal to all the internal plane apps
* invalidate app credentials in cache when app got updated
* fix: pass workspace context for system script execution in automations
System scripts have workspace=None, so accessing script.workspace.id
would fail. Now the automation passes its own workspace_id/workspace_slug
and script_executor falls back to caller-provided values.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* refactor: extract shared TypeScript parser into ts-parser module
Move duplicated acorn + tsPlugin initialization from code-validator.ts
and server.ts into a single shared ts-parser.ts module.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix: type errors for acorn node
---------
Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: gakshita <[email protected]>
* perf: optimize IssueRelationViewSet from ~22 queries to 2
Replace 12 separate IssueRelation filter queries with a single
aggregate query using ArrayAgg, and 10 separate Issue queries with
a single query. Remove dead subquery annotations (cycle_id,
link_count, attachment_count, sub_issues_count) and unnecessary
select_related/prefetch_related. Fix N+1 queries in create and
remove_relation by adding select_related for serializer access.
Add null check in remove_relation to prevent crash on missing relation.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* perf: optimize external API issue relation endpoints
Apply the same query optimizations from the internal API to the external
API endpoints: replace select_related + Python loop with a single
aggregate query in GET, fix N+1 queries in POST create by re-fetching
with select_related, and add null safety to POST remove.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
---------
Co-authored-by: Claude Opus 4.6 <[email protected]>
* feat: implement group sync functionality for OIDC authentication
- Added GroupSyncConfig and GroupMapping models for managing group sync settings and mappings.
- Introduced GroupSyncService to handle user project membership synchronization based on IdP groups.
- Created endpoints for managing group sync configurations and mappings.
- Updated OIDC authentication flow to trigger group sync on user login.
- Enhanced URL routing to include group sync related endpoints.
- Implemented serializers for group sync models to facilitate API interactions.
- Added utility functions for processing group sync during authentication.
This feature enables seamless integration of group-based access control for users authenticated via OIDC, enhancing the overall user management experience.
* refactor: implement IdP group sync feature for automatic project membership management
- Removed GroupMappingDetailEndpoint and updated related URLs to consolidate group mapping management under GroupMappingEndpoint.
- Enhanced GroupSyncService to automatically add users to workspaces and projects based on IdP group claims during login.
- Updated serializers and views to support new group sync functionality.
- Added comprehensive documentation for IdP group syncing, detailing configuration and behavior.
- Introduced a new source field in ProjectMember to track membership origin (manual, group sync).
- Adjusted migrations to reflect changes in project member source tracking.
* feat: enhance group synchronization logic to handle membership removal and activation
- Added logic to remove memberships for users with no matching groups if auto-remove is enabled.
- Implemented activation of existing project memberships when a user is re-added.
- Introduced workspace synchronization task to ensure membership consistency across projects.
- Updated ProjectMember model to prevent duplicate user properties during project member creation.
* feat: add offline group synchronization task for IdP integration
- Introduced a new periodic task to sync OIDC groups for enabled workspaces every 6 hours.
- Added `sync_offline` field to `GroupSyncConfig` model to control offline synchronization.
- Enhanced OIDC group provider to handle expired and invalid refresh tokens.
- Updated serializers and migrations to support new functionality.
- Configured rate limiting for IdP API calls to prevent hitting rate limits during synchronization.
* feat: added group syncing feature in workspace
* chore: add licensing information to group_sync_task.py
* refactor: sdded navigation logic to redirect users if group syncing feature is disabled.
* feat: add group syncing translations for multiple languages
* fix: added empty state group syncing icon
* refactor: update group syncing types and component imports
* refactor: used clientLoader to redirect users based on IDP_GROUP_SYNC availability.
* fix: changed data observables to private
* refactor: rename type for delete mapping modal props for consistency
* refactor: use feature flag handling in group syncing clientLoader
* chore: regenerate migrations
* fix: remove celery debugger
* chore: remake migrations
* chore: remove unused imports
---------
Co-authored-by: b-saikrishnakanth <[email protected]>
* feat: add pagination support to WorkItemAdvancedSearchEndpoint
- Replace limit-based slicing with BasePaginator's paginate() method
- Add cursor and per_page query parameters for pagination control
- Update OpenAPI schema with pagination parameters and response format
- Remove limit field from request serializer (now handled via query params)
- Response now includes total_count, next_cursor, prev_cursor, etc.
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* feat: add consolidated work item properties endpoint
Add new API endpoint GET/PATCH /workspaces/{slug}/projects/{project_id}/work-items/{pk}/properties/
that returns a work item with all default fields AND custom properties in a single response.
- Custom properties are included as custom_field_<name> keys with metadata and values
- Supports PATCH to update both standard fields and custom properties
- Custom properties only included when ISSUE_TYPES feature flag is enabled
- Option values accept both UUID and name (case-insensitive)
- Uses bulk operations for efficient property value updates
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* feat: add work item type schema endpoint
Add new endpoint to retrieve schema for work item types including
standard fields and custom properties with their available options.
- GET /workspaces/{slug}/projects/{project_id}/work-item-types/schema/
- Optional type_id query param to get schema for specific type
- Optional include=members,labels query param for large option sets
- Returns standard fields always, custom fields when type exists
- Handles projects with and without work item types enabled
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* feat: add work item create endpoint with custom field support
Adds a new POST endpoint for creating work items that supports:
- Standard fields (name, state, priority, assignees, labels, dates)
- Custom property fields using the custom_field_{name} format
- Validation for type_id requirement when work item types are enabled
- Detailed validation errors for all custom field types
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* test: add contract tests for work item endpoints
Adds comprehensive contract tests for:
- WorkItemPropertiesAPIEndpoint (GET/PATCH)
- WorkItemTypeSchemaAPIEndpoint (GET)
- WorkItemCreateAPIEndpoint (POST)
Tests cover:
- Standard field operations
- Custom property CRUD operations
- Feature flag behavior (enabled/disabled)
- Validation error scenarios
- Option fields by ID and name
- Required field validation
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* refactor: use standalone serializer with explicit _id field names
- Replace IssueDetailSerializer inheritance with ModelSerializer
- Explicitly define all FK fields with _id suffix for consistency
- Add assignee_ids and label_ids as computed fields
- Fix UUID comparison issues in contract tests
This ensures consistent field naming across GET/PATCH/POST responses
(state_id, workspace_id, project_id instead of state, workspace, project)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* docs: add OpenAPI decorators for work item endpoints
Adds drf-spectacular @extend_schema decorators to:
- WorkItemPropertiesAPIEndpoint (GET/PATCH)
- WorkItemTypeSchemaAPIEndpoint (GET)
- WorkItemCreateAPIEndpoint (POST)
Includes operation IDs, summaries, descriptions, parameters,
request/response schemas, and examples for API documentation.
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* formatting and lint changes
---------
Co-authored-by: Claude Opus 4.5 <[email protected]>
Adds redacted request payload and response body logging to
RequestLoggerMiddleware when /auth/o/token/ returns 400, making it
easier to debug OAuth token failures.
Co-authored-by: Claude Opus 4.6 <[email protected]>
* fix: removed the in_app validation and handled the triage state when we create the intake
* dev: handled the triage state in intake create mutation
* dev: added triage state in seed
* dev: replaced workspace_slug with workspace_id in intake setting get or create
* dev: created triage state class method and replaced the instances
* dev: updated the class method
* dev: handled the intake issue
* feat: introducing plane runner
- Add a new runnerctl app in API to orchestrate and manage runs.
- Models to store and process RunnerTask and RunnerTaskExecutions
- APIs for both web and inter service communication
- Add a new app `node-runner` to run the node code in vm
- Setup sandboxing using node vm to build and run the code
- Talks to runnerctl through APIs to fetch and report the task run status
* feat: settings page with editor
* fix: typo
* feat: add list, create and update script screens
- update APIs to use Session Auth
- fix issues in node runner
* add test run modal
* add delete button for task
* fix: refactor
* feat: use Script as main entity in Plane runner
- all features would have to use Script's as their action use cases
instead of Runner manager all of them
* chore: implemented scripts in automations
* add migrations
* feat: add test endpoints to build and run the code
- add /test endpoint in runnerctl service
- add /execute-sync endpoint in node-runner to run code in sync
* fix: refactor
* fix: refactor + UI improvements
* fix: refactor
* feat: add RunScript node in automation actions
* fix: cancel fn
* refactor: use execute-sync endpoint for all executions
- remove async code for executing code
- remove runnerctl service related code from node-runner
* fix: UI for automation script main layout + refactoring
* chore: add execution stats in scripts listing endpoint
* fix: route changed from /runners to /scripts
* fix: added relative last run
* fix: editor bg
* fix: test payload
* Merge branch 'preview' of github.com:makeplane/plane-ee into feat-plane-runner-ui
* feat: setup runner app migration
* feat: use oauth tokens to run scripts
* fix: refactor
* fix: types
* chore: use workspaceSlug from execution context in runner
- use cached oauth tokens instead of generating new tokens all the time
* feat: only show scripts in sidebar and automations when installed
- now we'll enable Scripts as feature only when the oauth app is installed
* fix: refactor
* fix: refactor
* fix: refactor
* fix: refactor
* fix: formatting
* fix: added direct import for types to handle self hosted and airgapped instances
* add variables support
* add support for variables in node-runner
* Add fresh migrations for runnerctl
* add copyright on all runner files
* add variables UI for runner scripts and automations
- Add TVariableDefinition type and variables field to RunnerScript type
- Add TVariableFormData and variables to RunnerScriptFormData
- Add execution_variables to TRunScriptActionConfig for automations
- Create VariablesField component for script form (collapsible, save/remove)
- Update scriptToFormData and formDataToScriptPayload to handle variables
- Update TestScript component to show variable input fields and send execution_variables
- Update AutomationActionRunScriptConfiguration to show variable inputs when script selected
- Update runnerctl.service.ts to pass execution_variables in testScript
- Update Python API serializers to include variables in script list/lite responses
- Update script_test view to pass execution_variables to execute_sync
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* add reusable functions feature for runner scripts
- Add ScriptFunction model with system/workspace function support
- Add API endpoints for functions CRUD operations
- Add system function seeds (http, notifications, data, utils)
- Add Functions namespace injection into node-runner VM context
- Add functions dashboard with search, filter, and view modal
- Add function browser modal for inserting functions into scripts
- Add create/update function form with auto-generated code templates
- Add function name mismatch warning in code editor
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* build code and use build to run instead of building with every run
* refactor: update build api to extract functions from code
- only send used functions to runner for execution
- test api will also now validate the code and functions used
* add execution variables in automation and ui changes
* add fixtures for scripts and functions for system defined ones
* use threadpool to fetch token with new connection
* ui style changes for functions
* fix linter issues
* add PLANE_RUNNER feature flag and rename settings tab
* move ee components to core
* add runner urls in settings and reset migrations
* fix: refactoring + css fixes
* add node-runner build in github workflow
* replace node-runner Dockerfile with turbo-based Dockerfile.runner
- Remove old Dockerfile and docker-compose.yml
- Add Dockerfile.runner using turbo prune pattern (like silo)
- Update build-branch-cloud.yml to use Dockerfile.runner
Co-Authored-By: Claude Opus 4.5 <[email protected]>
* fix: refactor + route fixed
* fix: changed folder name from scripts to runner-scripts
* fix: monaco editor theme based color
* fix: empty state and upgrade screen without img
* chore: add code validators while executing code
- reset fixtures for scripts and functions to empty
* fix: empty state + upgrade
* fix: empty state + upgrade
* fix: empty state assets
* fix: empty state assets
* feat: add AutomationEventInput for better DX writing scripts
* fix: types + formatting
* fix: types + formatting
* fix: formatting
* fix: bumped @vitest/eslint-plugin
* fix: api formatting changes
---------
Co-authored-by: Surya Prashanth <[email protected]>
Co-authored-by: Claude Opus 4.5 <[email protected]>
* feat: optimize link crawler method
* chore: remove unused file
* chore: updated docs
* refactor link crawler to model save method from views
* fix: lint