Jan 23 2020 04:15 PM
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:
If I do a List Tasks and grab the JSON body of the List Tasks output via a Compose flow block e.g.:
...the Tasks's Order Hints order the Tasks to match what I see in Microsoft Planner in that Bucket (as expected):
Title | OrderHint - Initial |
Test5 | 8586225556019748676PQ |
Test4 | 8586225556030217433Pl |
Test3 | 8586225556040992244P6 |
Test2 | 8586225556087825095PU |
Test1 | 8586225556103966463P} |
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:
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:
Title | OrderHint - Initial | OrderHint - After Manual-By-Hand Rearranging Tasks |
Test5 | 8586225556019748676PQ | 8586225556019748676PQ |
Test4 | 8586225556030217433Pl | 8586225556030217433Pl |
Test3 | 8586225556040992244P6 | 8586225556040992244P6 |
Test2 | 8586225556087825095PU | 8586225556087825095PU |
Test1 | 8586225556103966463P} | 8586225556103966463P} |
Help????
Jan 23 2020 07:16 PM
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.
Jan 24 2020 02:15 PM
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": []
Jan 24 2020 03:18 PM
@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.
Jan 24 2020 05:47 PM
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 :(
Jan 24 2020 05:59 PM
@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.
Jan 24 2020 06:17 PM
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!
Jan 28 2020 09:18 AM