Agile Sprint

Added in version 3.1.0.

Requires the RedmineUP Agile plugin (redmine_agile) PRO >= 1.6.0, sprints have to be enabled in its settings. Listing, creating, updating and deleting require the manage_sprints permission, reading a single sprint requires manage_backlog.

Note

This resource targets RedmineUP’s Agile plugin. For redmine_expert_agile see Expert Agile Sprint.

Manager

All operations on the AgileSprint resource are provided by its manager. To get access to it you have to call redmine.agile_sprint where redmine is a configured redmine object. Sprints are always addressed through their project, resource methods (save(), delete(), refresh()) use the sprint’s project automatically.

Create methods

create

redminelib.managers.ResourceManager.create(**fields)

Creates new AgileSprint resource with given fields.

Parameters:
  • project_id (int or string) – (required). Id or identifier of sprint’s project.

  • name (string) – (required). Sprint name, unique per project.

  • start_date (string or date object) – (required). Sprint start date.

  • end_date (string or date object) – (required). Sprint end date.

  • description (string) – (optional). Sprint description.

  • status (string) – (optional). One of open (default), active or closed, converted to the integer the plugin expects.

  • sharing (string) – (optional). One of none (default), descendants, hierarchy, tree or system, converted to the integer the plugin expects.

Returns:

Resource object

>>> sprint = redmine.agile_sprint.create(
...     project_id='scrum',
...     name='Sprint 5',
...     start_date=datetime.date(2026, 1, 5),
...     end_date=datetime.date(2026, 1, 16),
...     status='active'
... )
>>> sprint
<redminelib.resources.AgileSprint #5 "Sprint 5">

Read methods

get

redminelib.managers.ResourceManager.get(resource_id, **params)

Returns single AgileSprint resource with story_points, done_ratio and (with the view_time_entries permission) estimated_hours and spent_hours of its issues. The plugin doesn’t return dates, status and sharing here, use filter() for the dates.

Parameters:
  • resource_id (int) – (required). Id of the sprint.

  • project_id (int or string) – (required). Id or identifier of sprint’s project.

  • include (list) – (optional). Fetches associated data in one call. Accepted values:

    • issues

Returns:

Resource object

>>> sprint = redmine.agile_sprint.get(5, project_id='scrum', include=['issues'])
>>> sprint.story_points
13
>>> sprint.issues
<redminelib.resultsets.ResourceSet object with Issue resources>

Warning

In a live test with Agile 1.6.14 the plugin returned story_points and estimated_hours of the sprint’s issues as null (and the sprint total as 0) although the issues had them. Read story points per issue from Agile Data instead of relying on the sprint totals.

all

Not supported by the Agile plugin

filter

redminelib.managers.ResourceManager.filter(**filters)

Returns the project’s own AgileSprint resources (shared sprints aren’t listed) with name, description and dates. The plugin doesn’t paginate.

Parameters:

project_id (int or string) – (required). Id or identifier of sprints’ project.

Returns:

ResourceSet object

>>> sprints = redmine.agile_sprint.filter(project_id='scrum')
>>> sprints
<redminelib.resultsets.ResourceSet object with AgileSprint resources>

Update methods

update

redminelib.managers.ResourceManager.update(resource_id, **fields)

Updates values of given fields of an AgileSprint resource. Accepts the same fields as create(). The plugin answers with a redirect to the sprint’s HTML page, which is not followed but treated as success.

Parameters:
  • resource_id (int) – (required). Sprint id.

  • project_id (int or string) – (required). Id or identifier of sprint’s project.

Returns:

True

>>> redmine.agile_sprint.update(5, project_id='scrum', status='closed')
True

save

redminelib.resources.AgileSprint.save(**attrs)

Saves current state of an AgileSprint resource.

Returns:

Resource object

>>> sprint = redmine.agile_sprint.filter(project_id='scrum')[0]
>>> sprint.save(end_date=datetime.date(2026, 1, 20))
<redminelib.resources.AgileSprint #5 "Sprint 5">

Delete methods

delete

redminelib.managers.ResourceManager.delete(resource_id, **params)

Deletes an AgileSprint, its issues are unassigned from it.

Parameters:
  • resource_id (int) – (required). Sprint id.

  • project_id (int or string) – (required). Id or identifier of sprint’s project.

Returns:

True

>>> redmine.agile_sprint.delete(5, project_id='scrum')
True

Export

Not supported by the Agile plugin