Skip to content

planning commands using planning_cli were not registered#2809

Merged
petrjasek merged 1 commit intosuperdesk:developfrom
petrjasek:fix-planning-commands-registration
Apr 17, 2026
Merged

planning commands using planning_cli were not registered#2809
petrjasek merged 1 commit intosuperdesk:developfrom
petrjasek:fix-planning-commands-registration

Conversation

@petrjasek
Copy link
Copy Markdown
Member

Purpose

What has changed

Steps to test

Front-end checklist

  • This pull request is adding missing TypeScript types to modified code segments where it's easy to do so with confidence
  • This pull request is using TypeScript interfaces instead of prop-types and updates usages where it's quick to do so
  • This pull request is using memo or PureComponent to define new React components (and updates existing usages in modified code segments)
  • This pull request is replacing lodash.get with optional chaining and nullish coalescing for modified code segments
  • This pull request is not importing anything from client-core directly (use superdeskApi)
  • This pull request is importing UI components from superdesk-ui-framework and superdeskApi when possible instead of using ones defined in this repository.
  • This pull request is not using planningApi where it is possible to use superdeskApi
  • This pull request is not adding redux based modals
  • In this pull request, properties of redux state are not being passed as props to components; instead, we connect it to the component that needs them. Except components where using a react key is required - do not connect those due to performance reasons.
  • This pull request is not adding redux actions that do not modify state (e.g. only calling angular services; those should be moved to planningApi)

Resolves: #[issue-number]

Copilot AI review requested due to automatic review settings April 17, 2026 12:06
@petrjasek petrjasek requested a review from BrianMwangi21 April 17, 2026 12:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes Planning CLI command registration by switching Planning commands from the local planning_cli command group to the global superdesk.commands.cli group, ensuring these commands are actually registered and available via manage.py.

Changes:

  • Replace from .async_cli import planning_cli with from superdesk.commands import cli in affected commands.
  • Update decorators from @planning_cli.command(...) to @cli.command(...) for the impacted commands.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
server/planning/commands/purge_expired_locks.py Registers planning:purge_expired_locks using the global CLI registry.
server/planning/commands/flag_expired_items.py Registers planning:flag_expired using the global CLI registry.
server/planning/commands/delete_spiked_items.py Registers planning:delete_spiked using the global CLI registry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@petrjasek petrjasek merged commit efece86 into superdesk:develop Apr 17, 2026
17 checks passed
@petrjasek petrjasek deleted the fix-planning-commands-registration branch April 17, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants