首页 > 解决方案 > 如何使用 Phabricator “maniphest.edit” API 向列添加票证,同时还使用其“beforePHIDs”参数?

问题描述

根据 maniphest.edit "Transaction Type: Column"文档beforePHIDs参数应该是一个 PHID 数组。我认为这将如下所示:

curl https://5555/api/maniphest.edit \
    -d api.token=api-token \
    -d transactions[0][type]=column \
    -d transactions[0][value][0][columnPHID]=PHID-PCOL-6666 \
    -d transactions[0][value][0][beforePHIDs][0]=PHID-TASK-7777 \
    -d objectIdentifier=PHID-TASK-8888

但是,当这样调用(beforePHIDs作为数组)时,我收到以下错误,这似乎与文档相矛盾:

Exception when processing transaction of type "column": Error while reading "value[0]": Expected string, got something else.

我的 curl 语句需要如何更改才能使其正常工作?我已经尝试了所有我能想到的排列方式。或者这可能是一个错误?

旁注 - 这工作正常,但它不允许控制票插入点:

curl https://5555/api/maniphest.edit \
    -d api.token=api-token \
    -d transactions[0][type]=column \
    -d transactions[0][value][0]=PHID-PCOL-6666 \
    -d objectIdentifier=PHID-TASK-8888

标签: phabricatormaniphest

解决方案


推荐阅读