计划程序“orderHint”属性不起作用

时间:2017-02-02 10:39:44

标签: office365 microsoft-graph

如果我通过Graph以编程方式在计划程序任务中创建一个清单,那么对于“orderHint”属性使用什么值无关紧要,界面中的顺序总是错误的/随机的。

Planner CheckList 'orderHint' Values

如果我尝试复制现有任务并重复使用相同的'orderHint'属性值,那么每当我随后尝试在计划器界面中重新排序对象时,都会收到错误消息。

error message when re-ordering

请帮忙,因为我们的TAM说只有你能支持这个。

https://graph.microsoft.com/beta/tasks/R2FvptrF7EeuH8GmbjyUn5YAAJd4/details

client-request-id: bdc5c383-962b-464e-80af-9bf408149897
request-id: bdc5c383-962b-464e-80af-9bf408149897
etag: W/"JzEtMDAwMDAwMDAwMDAwMDAwMi8yMDE3LTAyLTAyVDA5OjE4OjE3LjE5ODAwOTgrMDA6MDAn"
content-type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
cache-control: private
Status Code: 200

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#tasks('R2FvptrF7EeuH8GmbjyUn5YAAJd4')/details/$entity",
    "@odata.etag": "W/\"JzEtMDAwMDAwMDAwMDAwMDAwMi8yMDE3LTAyLTAyVDA5OjE4OjE3LjE5ODAwOTgrMDA6MDAn\"",
    "description": null,
    "previewType": "checklist",
    "completedBy": null,
    "references": {},
    "checklist": {
        "1386478b-e55c-409f-08f4-24eedf6197fe": {
            "@odata.type": "#microsoft.graph.checklistItem",
            "isChecked": false,
            "title": "Create CMDB Entry",
            "orderHint": "0050812894318267352A",
            "lastModifiedBy": "6c380823-9147-4962-b762-72875c84432d",
            "lastModifiedDateTime": "2017-02-02T09:00:34.67Z"
        },
        "1dc8425c-63a9-4463-777f-6db7e8f192f6": {
            "@odata.type": "#microsoft.graph.checklistItem",
            "isChecked": false,
            "title": "Delivery Confirmed",
            "orderHint": "0050812894318311188A",
            "lastModifiedBy": "6c380823-9147-4962-b762-72875c84432d",
            "lastModifiedDateTime": "2017-02-02T09:00:34.67Z"
        },
        "cbb8731b-defa-4604-3baf-9830abede10d": {
            "@odata.type": "#microsoft.graph.checklistItem",
            "isChecked": false,
            "title": "IP adresses Provided",
            "orderHint": "0050812894318280165A",
            "lastModifiedBy": "6c380823-9147-4962-b762-72875c84432d",
            "lastModifiedDateTime": "2017-02-02T09:00:34.67Z"
        },
        "205f67a7-7083-42dd-40fb-c00de5ecdbf1": {
            "@odata.type": "#microsoft.graph.checklistItem",
            "isChecked": false,
            "title": "Network cabling OK",
            "orderHint": "0050812894318290788A",
            "lastModifiedBy": "6c380823-9147-4962-b762-72875c84432d",
            "lastModifiedDateTime": "2017-02-02T09:00:34.67Z"
        },
        "2457a352-bc83-4b55-075f-df8d565416d5": {
            "@odata.type": "#microsoft.graph.checklistItem",
            "isChecked": false,
            "title": "Hardware racked",
            "orderHint": "0050812894318301098A",
            "lastModifiedBy": "6c380823-9147-4962-b762-72875c84432d",
            "lastModifiedDateTime": "2017-02-02T09:00:34.67Z"
        }
    },
    "id": "R2FvptrF7EeuH8GmbjyUn5YAAJd4"
}

1 个答案:

答案 0 :(得分:0)

在渲染任务列表时,Planner应用程序使用orderHint属性。但是,除非在请求中明确要求,否则Graph API不会对结果进行排序。

尝试在查询中添加orderBy=orderHint

https://graph.microsoft.com/beta/tasks/R2FvptrF7EeuH8GmbjyUn5YAAJd4/details?orderBy=orderHint