Moving and Packaging Items

Moving Items

Every item (except the root) has a parent container.

To move an item into a container without specifying its position in the container, simply update the item’s parent_id. This will move the item into the specified container in last position.

To specify an item’s position within a container, POST to one of the following:

  • move_before
  • move_after
    with a parameter:
  • other_id - the ID of the other item, before of after which to move this item

For example:

% curl https://app.liquidplanner.com/api/v1/workspaces/:id/tasks/:id/move_before?other_id=:id -X POST
% curl https://app.liquidplanner.com/api/v1/workspaces/:id/tasks/:id/move_after?other_id=:id -X POST

or, where applicable:

  • packaged_other_id - the ID of the other item (in its packaged location!), before or after which to move this item

For example:

% curl https://app.liquidplanner.com/api/v1/workspaces/:id/tasks/:id/move_before?packaged_other_id=:id -X POST
% curl https://app.liquidplanner.com/api/v1/workspaces/:id/tasks/:id/move_after?packaged_other_id=:id -X POST

Packaging Items

Leaf items may be both moved and packaged, while container items may only be moved (but not packaged).

When you package an item, its package_id is set to that of the containing package, but its parent_id remains the same. Its effective priority for scheduling becomes that of its packaged location (whether this is higher or lower than the priority of its “real” location).

📘

You can only package an item if its parent is not a package (i.e. when its parent is a folder or a project).

To specify an item’s packaged position within a container, POST to one of the following:

  • package_before
  • package_after

Parameter:

  • other_id - the ID of the other item, before or after which to package this item

For example:

% curl https://app.liquidplanner.com/api/v1/workspaces/:id/tasks/:id/package_before?other_id=:id id -X POST
% curl https://app.liquidplanner.com/api/v1/workspaces/:id/tasks/:id/package_after?other_id=:id -X POST

📘

Note that you never use the packaged_other_id here, because it is unambiguous which other you mean (either its package_id is set, or its parent_id is that of a package – but never both).