ConsensusReviewTask Objects

class ConsensusReviewTask(WorkflowTask)

options

Represents tasks in the Review stage of a Consensus Project.

Attributes

  • status (ConsensusReviewTaskStatus): The status of the review task.
  • data_hash (UUID): Unique ID for the data unit.
  • data_title (str): Name of the data unit.
  • assignee (Optional[str]): The user assigned to the task.
  • options (List[ConsensusReviewOption]): Specify the labels for the task.

Allowed actions

  • approve: Approves a task.
  • reject: Rejects a task.
  • assign: Assigns a task to a user.
  • release: Releases a task from the current user.

approve

def approve(*,
            assignee: Optional[str] = None,
            retain_assignee: bool = False,
            bundle: Optional[Bundle] = None) -> None

Approve the current task.

Parameters

  • assignee (Optional[str]): User email to be assigned to the review task whilst approving the task.
  • retain_assignee (bool): Retains the current assignee whilst approving the task. This is ignored if assignee is provided. An error will occur if the task does not already have an assignee and retain_assignee is True.
  • bundle (Optional[Bundle]): Optional bundle of actions to execute with the approval.

Returns

None

reject

def reject(*,
           assignee: Optional[str] = None,
           retain_assignee: bool = False,
           bundle: Optional[Bundle] = None) -> None

Reject the current task.

Parameters

  • assignee (Optional[str]): User email to be assigned to the review task whilst rejecting the task.
  • retain_assignee (bool): Retains the current assignee whilst rejecting the task. This is ignored if assignee is provided. An error will occur if the task does not already have an assignee and retain_assignee is True.
  • bundle (Optional[Bundle]): Optional bundle of actions to execute with the rejection.

Returns

None

assign

def assign(assignee: str, *, bundle: Optional[Bundle] = None) -> None

Assign the current task to a user.

Parameters

  • assignee (str): The user to assign the task to.
  • bundle (Optional[Bundle]): Optional bundle of actions to execute with the assignment.

Returns

None

release

def release(*, bundle: Optional[Bundle] = None) -> None

Release the current task from the current user.

Parameters

  • bundle (Optional[Bundle]): Optional bundle of actions to execute with the release.

Returns

None