SprintService implements Errorable
Table of Contents
Interfaces
- Errorable
Constants
- ERROR_COULD_NOT_ADD_SPRINT = 'TASKS_SS_01'
- ERROR_COULD_NOT_CHANGE_SORT = 'TASKS_SS_09'
- ERROR_COULD_NOT_COMPLETE_SPRINT = 'TASKS_SS_06'
- ERROR_COULD_NOT_READ_LAST_COMPLETED_SPRINT = 'TASKS_SS_14'
- ERROR_COULD_NOT_READ_PLANNED_SPRINTS = 'TASKS_SS_13'
- ERROR_COULD_NOT_READ_SPRINT = 'TASKS_SS_03'
- ERROR_COULD_NOT_READ_SPRINT_BY_GROUP = 'TASKS_SS_10'
- ERROR_COULD_NOT_READ_SPRINT_BY_ID = 'TASKS_SS_15'
- ERROR_COULD_NOT_REMOVE_SPRINT = 'TASKS_SS_04'
- ERROR_COULD_NOT_START_SPRINT = 'TASKS_SS_05'
- ERROR_COULD_NOT_UPDATE_SPRINT = 'TASKS_SS_02'
Methods
- __construct() : mixed
- canCompleteSprint() : bool
- canStartSprint() : bool
- changeSort() : void
- changeSprint() : bool
- completeSprint() : EntityForm
- createSprint() : EntityForm
- getActiveSprintByGroupId() : EntityForm
- Gets active sprint by group id.
- getCompletedSprints() : array<string|int, mixed>
- getCompletedStoryPoints() : float
- getCompletedStoryPointsMap() : array<string|int, mixed>
- getCompletedTasksMap() : array<string|int, mixed>
- getDateEndFromLastPlannedSprint() : int|null
- The method returns the end date of the last planned sprint.
- getErrorByCode() : mixed
- getErrors() : mixed
- getLastCompletedSprint() : EntityForm
- Returns a last completed sprint by scrum group id.
- getPlannedSprints() : array<string|int, EntityForm>
- The method returns the planned sprints of the project.
- getSprintById() : EntityForm
- getSprintData() : array<string|int, mixed>
- The method returns an array of data in the required format for the client app.
- getSprintRanges() : SprintRanges
- The method returns object with info about the time sprint days of the sprint.
- getSprintsByGroupId() : array<string|int, EntityForm>
- Returns an array objects with sprints by scrum group id.
- getUncompletedSprints() : array<string|int, mixed>
- getUnCompletedStoryPoints() : float
- removeSprint() : bool
- startSprint() : EntityForm
Constants
ERROR_COULD_NOT_ADD_SPRINT
public
mixed
ERROR_COULD_NOT_ADD_SPRINT
= 'TASKS_SS_01'
ERROR_COULD_NOT_CHANGE_SORT
public
mixed
ERROR_COULD_NOT_CHANGE_SORT
= 'TASKS_SS_09'
ERROR_COULD_NOT_COMPLETE_SPRINT
public
mixed
ERROR_COULD_NOT_COMPLETE_SPRINT
= 'TASKS_SS_06'
ERROR_COULD_NOT_READ_LAST_COMPLETED_SPRINT
public
mixed
ERROR_COULD_NOT_READ_LAST_COMPLETED_SPRINT
= 'TASKS_SS_14'
ERROR_COULD_NOT_READ_PLANNED_SPRINTS
public
mixed
ERROR_COULD_NOT_READ_PLANNED_SPRINTS
= 'TASKS_SS_13'
ERROR_COULD_NOT_READ_SPRINT
public
mixed
ERROR_COULD_NOT_READ_SPRINT
= 'TASKS_SS_03'
ERROR_COULD_NOT_READ_SPRINT_BY_GROUP
public
mixed
ERROR_COULD_NOT_READ_SPRINT_BY_GROUP
= 'TASKS_SS_10'
ERROR_COULD_NOT_READ_SPRINT_BY_ID
public
mixed
ERROR_COULD_NOT_READ_SPRINT_BY_ID
= 'TASKS_SS_15'
ERROR_COULD_NOT_REMOVE_SPRINT
public
mixed
ERROR_COULD_NOT_REMOVE_SPRINT
= 'TASKS_SS_04'
ERROR_COULD_NOT_START_SPRINT
public
mixed
ERROR_COULD_NOT_START_SPRINT
= 'TASKS_SS_05'
ERROR_COULD_NOT_UPDATE_SPRINT
public
mixed
ERROR_COULD_NOT_UPDATE_SPRINT
= 'TASKS_SS_02'
Methods
__construct()
public
__construct([int $userId = 0 ]) : mixed
Parameters
- $userId : int = 0
canCompleteSprint()
public
canCompleteSprint(int $userId, int $groupId) : bool
Parameters
- $userId : int
- $groupId : int
Return values
boolcanStartSprint()
public
canStartSprint(int $userId, int $groupId) : bool
Parameters
- $userId : int
- $groupId : int
Return values
boolchangeSort()
public
changeSort(array<string|int, mixed> $sortInfo) : void
Parameters
- $sortInfo : array<string|int, mixed>
changeSprint()
public
changeSprint(EntityForm $sprint[, PushService $pushService = null ]) : bool
Parameters
- $sprint : EntityForm
- $pushService : PushService = null
Return values
boolcompleteSprint()
public
completeSprint(EntityForm $sprint, EntityService $entityService, TaskService $taskService, KanbanService $kanbanService, ItemService $itemService[, int $targetEntityId = 0 ][, PushService $pushService = null ]) : EntityForm
Parameters
- $sprint : EntityForm
- $entityService : EntityService
- $taskService : TaskService
- $kanbanService : KanbanService
- $itemService : ItemService
- $targetEntityId : int = 0
- $pushService : PushService = null
Return values
EntityFormcreateSprint()
public
createSprint(EntityForm $sprint[, PushService $pushService = null ]) : EntityForm
Parameters
- $sprint : EntityForm
- $pushService : PushService = null
Return values
EntityFormgetActiveSprintByGroupId()
Gets active sprint by group id.
public
getActiveSprintByGroupId(int $groupId) : EntityForm
Parameters
- $groupId : int
-
Group id.
Return values
EntityFormgetCompletedSprints()
public
getCompletedSprints(int $groupId[, PageNavigation $sprintNav = null ]) : array<string|int, mixed>
Parameters
- $groupId : int
- $sprintNav : PageNavigation = null
Return values
array<string|int, mixed>getCompletedStoryPoints()
public
getCompletedStoryPoints(EntityForm $sprint, KanbanService $kanbanService, ItemService $itemService) : float
Parameters
- $sprint : EntityForm
- $kanbanService : KanbanService
- $itemService : ItemService
Return values
floatgetCompletedStoryPointsMap()
public
getCompletedStoryPointsMap(float $sumStoryPoints, array<string|int, mixed> $mapCompletedTasks, array<string|int, mixed> $itemsStoryPoints) : array<string|int, mixed>
Parameters
- $sumStoryPoints : float
- $mapCompletedTasks : array<string|int, mixed>
- $itemsStoryPoints : array<string|int, mixed>
Return values
array<string|int, mixed>getCompletedTasksMap()
public
getCompletedTasksMap(SprintRanges $sprintRanges, TaskService $taskService, array<string|int, mixed> $completedTaskIds) : array<string|int, mixed>
Parameters
- $sprintRanges : SprintRanges
- $taskService : TaskService
- $completedTaskIds : array<string|int, mixed>
Return values
array<string|int, mixed>getDateEndFromLastPlannedSprint()
The method returns the end date of the last planned sprint.
public
getDateEndFromLastPlannedSprint(int $groupId) : int|null
Parameters
- $groupId : int
-
Group id.
Tags
Return values
int|nullgetErrorByCode()
public
getErrorByCode(mixed $code) : mixed
Parameters
- $code : mixed
getErrors()
public
getErrors() : mixed
getLastCompletedSprint()
Returns a last completed sprint by scrum group id.
public
getLastCompletedSprint(int $groupId) : EntityForm
Parameters
- $groupId : int
-
Scrum group id.
Return values
EntityFormgetPlannedSprints()
The method returns the planned sprints of the project.
public
getPlannedSprints(int $groupId) : array<string|int, EntityForm>
Parameters
- $groupId : int
-
Project id.
Return values
array<string|int, EntityForm>getSprintById()
public
getSprintById(int $sprintId) : EntityForm
Parameters
- $sprintId : int
Return values
EntityFormgetSprintData()
The method returns an array of data in the required format for the client app.
public
getSprintData(EntityForm $sprint) : array<string|int, mixed>
Parameters
- $sprint : EntityForm
-
Data object.
Return values
array<string|int, mixed>getSprintRanges()
The method returns object with info about the time sprint days of the sprint.
public
getSprintRanges(EntityForm $sprint, Calendar $calendar) : SprintRanges
Parameters
- $sprint : EntityForm
- $calendar : Calendar
Tags
Return values
SprintRangesgetSprintsByGroupId()
Returns an array objects with sprints by scrum group id.
public
getSprintsByGroupId(int $groupId) : array<string|int, EntityForm>
Parameters
- $groupId : int
-
Scrum group id.
Return values
array<string|int, EntityForm>getUncompletedSprints()
public
getUncompletedSprints(int $groupId) : array<string|int, mixed>
Parameters
- $groupId : int
Return values
array<string|int, mixed>getUnCompletedStoryPoints()
public
getUnCompletedStoryPoints(EntityForm $sprint, KanbanService $kanbanService, ItemService $itemService) : float
Parameters
- $sprint : EntityForm
- $kanbanService : KanbanService
- $itemService : ItemService
Return values
floatremoveSprint()
public
removeSprint(EntityForm $sprint[, PushService $pushService = null ]) : bool
Parameters
- $sprint : EntityForm
- $pushService : PushService = null
Return values
boolstartSprint()
public
startSprint(EntityForm $sprint, TaskService $taskService, KanbanService $kanbanService, ItemService $itemService, BacklogService $backlogService[, RobotService $robotService = null ][, PushService $pushService = null ]) : EntityForm
Parameters
- $sprint : EntityForm
- $taskService : TaskService
- $kanbanService : KanbanService
- $itemService : ItemService
- $backlogService : BacklogService
- $robotService : RobotService = null
- $pushService : PushService = null