SOLVED

Potential bug in Microsoft Planner's Task Order Hint functionality

Copper Contributor

Cross-posting from https://powerusers.microsoft.com/t5/Building-Flows/Planner-Tasks-OrderHint-value-not-respecting-orde... as I'm not sure if this is a Microsoft Power Automate bug -- or a Microsoft Planner bug.

 

Hi there,

 

I have created manually-by-hand Tasks in a certain order in a Bucket in Microsoft Planner:

 

2020-01-14 17_31_24-Clipboard - initial task layout.png

 

If I do a List Tasks and grab the JSON body of the List Tasks output via a Compose flow block e.g.:

 

2020-01-14 17_41_04-Clipboard-getListTasks_body.png

 

...the Tasks's Order Hints order the Tasks to match what I see in Microsoft Planner in that Bucket (as expected):

 

TitleOrderHint - Initial
Test58586225556019748676PQ
Test48586225556030217433Pl
Test38586225556040992244P6
Test28586225556087825095PU
Test18586225556103966463P}


For reference sake, my concept of direction of sorting is taken from this docs.Microsoft.com how-to article: https://docs.microsoft.com/en-us/graph/api/resources/planner-order-hint-format?view=graph-rest-1.0


So if I was to manually-by-hand re-arrange those Tasks in that Bucket in Microsoft Planner -- and then run the same Flow to get the raw data of those Tasks, when sorted that raw data by Order Hint, the Task Titles should be ordered in a way that matches the display in Microsoft Planner, right?

 

Nope :(

 

In Microsoft Planner, in that same Bucket, I took the same Tasks and manually-by-hand I rearranged them into this order:

 

2020-01-14 17_34_24-Clipboard - after sorting by title.png

 

When I now run the same Power Automate Flow and retrieve the raw Task data, every one of those Tasks's Order Hints has not changed AT ALL:

 

TitleOrderHint - InitialOrderHint - After Manual-By-Hand Rearranging Tasks
Test58586225556019748676PQ8586225556019748676PQ
Test48586225556030217433Pl8586225556030217433Pl
Test38586225556040992244P68586225556040992244P6
Test28586225556087825095PU8586225556087825095PU
Test18586225556103966463P}8586225556103966463P}

 

 

 

Help????

7 Replies
best response confirmed by philCryo (Copper Contributor)
Solution

@philCryo Are you using the orderhint field on the Task entity? If so that is not what is used to sort tasks in the board view when grouped by buckets. Instead you need to look at the orderhints on the BucketTaskBoardTaskFormatting entity for the task.

@Anubhav Singh (OFFICE 365) 

Thank you for writing back.  Here are the fields I get when I run the List Tasks feature in Power Automate.  I don't see anything like "BucketTaskBoardTaskFormatting" as an attribute in this list.

 

 

 "@odata.etag": <the odata etag>,
    "planId": <plan's unique id>,
    "bucketId": <bucket's unique id>,
    "title": <task human-readable title>,
    "orderHint": "8586404548461516552",
    "assigneePriority": "",
    "percentComplete": 100,
    "startDateTime": null,
    "createdDateTime": "2019-06-21T21:20:39.3259255Z",
    "dueDateTime": null,
    "hasDescription": false,
    "previewType": "reference",
    "completedDateTime": "2019-06-26T01:13:03.5170485Z",
    "referenceCount": 1,
    "checklistItemCount": 0,
    "activeChecklistItemCount": 0,
    "conversationThreadId": null,
    "id": <task unique ID>,
    "createdBy": {
      "user": {
        "displayName": null,
        "id": <user's id>
      }
    },
    "completedBy": {
      "user": {
        "displayName": null,
        "id": <user's id>
      }
    },
    "appliedCategories": {},
    "assignments": {},
    "_assignments": []

 

 

@philCryo This is the Task entity only. 

The formatting entities are related entities for a task: For reference: https://docs.microsoft.com/en-us/graph/api/resources/plannertask?view=graph-rest-beta

Also https://docs.microsoft.com/en-us/graph/api/resources/plannerbuckettaskboardtaskformat?view=graph-res... for a description of the BucketTaskboardTaskFormatting entity for a given task.

Note: I am not familiar with Power automate, but given your json payload below, it is using the graph api under the hoods.

Hi @Anubhav Singh (OFFICE 365) 

 

Would ya look at that...It would appear that the Planner connector for Microsoft Power Automate does not have a way to retrieve the "BucketTaskBoardTaskFormat" of a Planner Task:

 

https://docs.microsoft.com/en-us/connectors/planner/

 

...even though the underlying Microsoft Graph API supports it :(

@philCryo Indeed, unfortunately it does seem so. I'll see if I can get in touch with the Flow connector's owner and help them exposing more details.

@Anubhav Singh (OFFICE 365) 

Oh that would be awesome!  If it helps at all, here is my official feature request in the Power Automate forums: https://powerusers.microsoft.com/t5/Connecting-To-Data/Feature-request-Access-Microsoft-Planner-Task...

 

(if there's a better place to put it, please let me know!)

 

Thank you again!

And I was requested to post to the Power Automate Ideas forum:

All, please vote for this feature-add: https://powerusers.microsoft.com/t5/Power-Automate-Ideas/Access-Microsoft-Planner-Task-s-BucketTaskB...
1 best response

Accepted Solutions
best response confirmed by philCryo (Copper Contributor)
Solution

@philCryo Are you using the orderhint field on the Task entity? If so that is not what is used to sort tasks in the board view when grouped by buckets. Instead you need to look at the orderhints on the BucketTaskBoardTaskFormatting entity for the task.

View solution in original post