Helping Organisations get organised!

MCP abilities

Category: lh-tasks. All abilities require the capability returned by LH_Tasks_task_post_type_class::return_required_capability() (default edit_others_posts) β€” this applies uniformly regardless of a task’s assigned_to/assignee; assignment is enforced as an additional identity check inside claim-next-task/complete-task/fail-task/reassign-task/renew-claim, not as a substitute for this capability gate. edit-task is the sole unconditional override.

  • lh-tasks/create-task β€” create a new task. Accepts queue (routing), task_type (classification), post_status (draft|pending|active, default active), and an optional assigned_to (WP user ID) to hard-assign it up front.
  • lh-tasks/claim-next-task β€” atomically claim the oldest available, unblocked, eligible task in a queue on behalf of the calling account (identity is always the authenticated caller, never input) β€” or, if task_id is given, claim that specific task instead. Eligible means unassigned or hard-assigned to the caller. Returns a claim_token required by the abilities below that act on a held claim.
  • lh-tasks/complete-task β€” mark a claimed task Resolved with an optional result payload. Requires the claim_token from claim-next-task; fails if the caller doesn’t currently hold the claim.
  • lh-tasks/fail-task β€” mark a task failed; reason_type: retryable (default) requeues or blocks depending on remaining retries, reason_type: needs_human skips retries and hands off via reassignment instead. Requires claim_token.
  • lh-tasks/reassign-task β€” release the current claim and hand a task off (optionally hard-assigning it to a specific account), logging a note on what’s done and what’s left. Requires claim_token β€” this is a self-service action for whoever currently holds the claim.
  • lh-tasks/renew-claim β€” heartbeat for a long-running claimed task: pushes claimed_at forward to now, without changing status or assignee, so the task stays ahead of the stale-claim sweep (default 10 minute cutoff) instead of risking auto-release mid-work. Requires claim_token. Optionally accepts a note, logged to progress_log (event heartbeat) the same way reassign-task logs its note β€” letting a heartbeat double as a lightweight progress trail. Added 1.7.0.
  • lh-tasks/edit-task β€” unconditional, edit_others_posts-gated queue-management override: set/clear assigned_to, release a stuck claim, and/or change status/queue, without needing to hold the current claim.
  • lh-tasks/get-task β€” retrieve a single task by ID.
  • lh-tasks/list-tasks β€” paginated, filterable list (status, queue, task_type, assignee, assigned_to).

If you like this plugin please consider making a donation to further development