🔍 Code Extractor

class PlannerChecklistItems

Maturity: 50

A specialized collection class that manages checklist items for Microsoft Planner tasks, inheriting from ClientValueCollection to provide collection operations for PlannerChecklistItem objects.

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/planner/tasks/check_list_items.py
Lines:
5 - 14
Complexity:
simple

Purpose

This class represents the collection of checklist items associated with a Microsoft Planner task. It serves as a container for PlannerChecklistItem objects and is part of the task details object in the Microsoft Graph API. As an Open Type collection, it provides type-safe management of checklist items with all the collection operations inherited from ClientValueCollection (such as adding, removing, and iterating over items).

Source Code

class PlannerChecklistItems(ClientValueCollection):
    """The plannerChecklistItemCollection resource represents the collection of checklist items on a task.
    It is an Open Type. It is part of the task details object.
    The value in the property-value pair is the checklistItem object.
    """

    def __init__(self, initial_values=None):
        super(PlannerChecklistItems, self).__init__(
            PlannerChecklistItem, initial_values
        )

Parameters

Name Type Default Kind
bases ClientValueCollection -

Parameter Details

initial_values: Optional parameter that accepts an initial collection of checklist items to populate the collection upon instantiation. Can be None (default) for an empty collection, or a list/iterable of PlannerChecklistItem objects or compatible data structures that can be converted to PlannerChecklistItem instances.

Return Value

Instantiation returns a PlannerChecklistItems object that acts as a typed collection container for PlannerChecklistItem objects. The collection inherits all methods from ClientValueCollection, which typically include methods for adding, removing, accessing, and iterating over items. Individual method returns depend on the inherited ClientValueCollection interface (e.g., add methods may return the added item, iteration yields PlannerChecklistItem objects).

Class Interface

Methods

__init__(self, initial_values=None)

Purpose: Initializes a new PlannerChecklistItems collection with optional initial checklist items

Parameters:

  • initial_values: Optional collection of initial PlannerChecklistItem objects or compatible data to populate the collection

Returns: None (constructor)

Attributes

Name Type Description Scope
_item_type type Inherited from ClientValueCollection, stores the type of items in the collection (PlannerChecklistItem) instance
_data list Inherited from ClientValueCollection, stores the actual collection of PlannerChecklistItem objects instance

Dependencies

  • office365

Required Imports

from office365.planner.tasks.checklist_items import PlannerChecklistItems
from office365.planner.tasks.check_list_item import PlannerChecklistItem

Usage Example

from office365.planner.tasks.checklist_items import PlannerChecklistItems
from office365.planner.tasks.check_list_item import PlannerChecklistItem

# Create an empty checklist items collection
checklist_items = PlannerChecklistItems()

# Create with initial values
initial_items = [
    PlannerChecklistItem(),
    PlannerChecklistItem()
]
checklist_items = PlannerChecklistItems(initial_values=initial_items)

# Typically used as part of task details
# task.details.checklist = checklist_items

# Inherited collection operations (from ClientValueCollection)
# checklist_items.add(new_item)
# for item in checklist_items:
#     print(item)
# item_count = len(checklist_items)

Best Practices

  • Always instantiate with the appropriate initial_values if you have existing checklist items to avoid multiple operations
  • Use inherited collection methods from ClientValueCollection for adding, removing, and accessing items rather than direct manipulation
  • This collection is typically accessed through a PlannerTask's details object rather than instantiated directly in most use cases
  • Ensure proper authentication and permissions are configured before attempting to read or modify checklist items
  • The collection is part of the task details object, so changes may need to be persisted through the parent task object's update methods
  • As an Open Type, the collection can accept additional properties beyond the standard schema
  • Remember that this is a client-side collection representation; actual persistence requires API calls through the parent task object

Similar Components

AI-powered semantic similarity - components with related functionality:

  • class PlannerChecklistItem 87.2% similar

    A data model class representing an item in a checklist associated with a Microsoft Planner task, inheriting from ClientValue for Office 365 API integration.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/planner/tasks/check_list_item.py
  • class PlannerPlanCollection 70.4% similar

    A collection class for managing Microsoft Planner Plan entities, providing methods to create and manage multiple PlannerPlan objects within a Microsoft Graph API context.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/planner/plans/collection.py
  • class ChecklistItem 70.3% similar

    A class representing a subtask within a larger todoTask in Microsoft 365/Office 365, inheriting from Entity base class.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/todo/checklist_item.py
  • class TodoTaskListCollection 62.2% similar

    A collection class for managing Microsoft To-Do task lists, providing methods to retrieve and create task list objects with delta query support.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/todo/tasks/list_collection.py
  • class PlannerPlan 61.6% similar

    The plannerPlan resource represents a plan in Microsoft 365. A plan can be owned by a group and contains a collection of plannerTasks. It can also have a collection of plannerBuckets. Each plan object has a details object that can contain more information about the plan. For more information about the relationships between groups, plans, and tasks, see Planner.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/planner/plans/plan.py
← Back to Browse