From c08e0bc00e927d50d35ba748e958c2d0ee338f9e Mon Sep 17 00:00:00 2001 From: Beau Cameron Date: Mon, 2 Oct 2023 16:49:52 -0600 Subject: [PATCH 1/2] Adding missing reference to get all plans Adding this to planner, not groups. --- docs/graph/planner.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/graph/planner.md b/docs/graph/planner.md index 6535567c5..21e977e69 100644 --- a/docs/graph/planner.md +++ b/docs/graph/planner.md @@ -247,3 +247,18 @@ const graph = graphfi(...); const bucketTasks = await graph.planner.buckets.getById('bucketId').tasks(); ``` + +## Get Plans for a group + +Gets all the plans for a group + +```TypeScript +import { graphfi } from "@pnp/graph"; +import "@pnp/graph/groups"; +import "@pnp/graph/planner"; + +const graph = graphfi(...); + +const plans = await graph.groups.getById("b179a282-9f94-4bb5-a395-2a80de5a5a78").plans(); + +``` From 3d67e7161d52583bf560896b2bfc44a943c879f0 Mon Sep 17 00:00:00 2001 From: Beau Cameron Date: Mon, 2 Oct 2023 16:59:13 -0600 Subject: [PATCH 2/2] Add missing Tasks endpoint Adding missing task endpoint to get all tasks on Me object. --- docs/graph/planner.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/graph/planner.md b/docs/graph/planner.md index 21e977e69..b850df567 100644 --- a/docs/graph/planner.md +++ b/docs/graph/planner.md @@ -106,6 +106,20 @@ const updPlan = await graph.planner.plans.getById('planId').update({title: 'New ``` +## Get All My Tasks from all plans + +Using the tasks() you can get the Tasks across all plans + +```TypeScript +import { graphfi } from "@pnp/graph"; +import "@pnp/graph/planner"; + +const graph = graphfi(...); + +const planTasks = await graph.me.tasks() + +``` + ## Get Task by Id Using the planner.tasks.getById() you can get a specific Task.