规划器中复选框的顺序

order of checkboxes in planner

如何获得计划程序中复选框的排序

它在规划器中的样子:

我获取任务详细信息,然后尝试找出该任务复选框的顺序:

GET https://graph.microsoft.com/v1.0/planner/tasks/<task id>/details

我得到的结果:

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#planner/tasks('aLn7T_rxpUCOpCg0WEByJpcAJecJ')/details/$entity",
    "@odata.etag": "W/\"JzEtVGFza0RldGFpbHMgQEBAQEBAQEBAQEBAQEBAZCc=\"",
    "description": "",
    "previewType": "checklist",
    "id": "aLn7T_rxpUCOpCg0WEByJpcAJecJ",
    "references": {},
    "checklist": {
        "16803": {
            "@odata.type": "#microsoft.graph.plannerChecklistItem",
            "isChecked": false,
            "title": "4",
            "orderHint": "85855241538H",
            "lastModifiedDateTime": "2022-04-05T20:45:43.8795559Z",
            "lastModifiedBy": {
                "user": {
                    "displayName": null,
                    "id": "f551a47b-7265-4e25-a3e6-2b933b899cf6"
                }
            }
        },
        "20910": {
            "@odata.type": "#microsoft.graph.plannerChecklistItem",
            "isChecked": true,
            "title": "0",
            "orderHint": "8585524154043557016P#",
            "lastModifiedDateTime": "2022-04-05T20:45:47.5743163Z",
            "lastModifiedBy": {
                "user": {
                    "displayName": null,
                    "id": "f551a47b-7265-4e25-a3e6-2b933b899cf6"
                }
            }
        },
        "24777": {
            "@odata.type": "#microsoft.graph.plannerChecklistItem",
            "isChecked": false,
            "title": "3",
            "orderHint": "8585524153=M",
            "lastModifiedDateTime": "2022-04-05T20:45:43.246933Z",
            "lastModifiedBy": {
                "user": {
                    "displayName": null,
                    "id": "f551a47b-7265-4e25-a3e6-2b933b899cf6"
                }
            }
        },
        "44078": {
            "@odata.type": "#microsoft.graph.plannerChecklistItem",
            "isChecked": false,
            "title": "5",
            "orderHint": "85855241535&",
            "lastModifiedDateTime": "2022-04-05T20:45:45.528325Z",
            "lastModifiedBy": {
                "user": {
                    "displayName": null,
                    "id": "f551a47b-7265-4e25-a3e6-2b933b899cf6"
                }
            }
        },
        "48712": {
            "@odata.type": "#microsoft.graph.plannerChecklistItem",
            "isChecked": true,
            "title": "1",
            "orderHint": "8585524153YG",
            "lastModifiedDateTime": "2022-04-05T20:45:48.2150138Z",
            "lastModifiedBy": {
                "user": {
                    "displayName": null,
                    "id": "f551a47b-7265-4e25-a3e6-2b933b899cf6"
                }
            }
        },
        "70751": {
            "@odata.type": "#microsoft.graph.plannerChecklistItem",
            "isChecked": false,
            "title": "2",
            "orderHint": "8585524153Fu",
            "lastModifiedDateTime": "2022-04-05T20:45:42.6364909Z",
            "lastModifiedBy": {
                "user": {
                    "displayName": null,
                    "id": "f551a47b-7265-4e25-a3e6-2b933b899cf6"
                }
            }
        }
    }
}

我认为复选框上的“orderHint”定义了它的顺序,但似乎并非如此:

Actual order Order Hint
0 8585524154043557016P#
1 8585524153YG
2 8585524153Fu
3 8585524153=M
4 85855241538H
5 85855241535&

如您所见,按“order hint”排序不会产生您在上面的屏幕截图中看到的实际顺序(相反的顺序也不起作用,“orderHint”字符串定义的顺序似乎只是随机的)。

所以,我认为复选框的顺序可能是其他定义的(或者 API 刚刚被破坏)?

OrderHint 是 属性 订购清单项目的权利。 UI 似乎以相反的顺序显示它们。请注意,比较需要是“顺序”的(例如,基于字符的 ASCII 值),特定于语言或区分大小写的比较将产生错误的结果:

> [StringComparer]::CurrentCulture.Compare("=", "8") # language specific sort order
-1
> [StringComparer]::Ordinal.Compare("=", "8") # ordinal sort order
5