如何在phabricator中定义自定义选项时添加对象搜索?

时间:2015-11-06 02:03:17

标签: phabricator

我正在尝试通过在maniphest.custom-field-definitions中添加文件来设置自定义搜索字段。完全自定义在

之下
{
  "mycompany:estimated-hours": {
    "name": "Estimated Hours",
    "type": "text",
    "caption": "Estimated number of hours this will take.",
    "required": true
  },
  "mycompany:deadline": {
    "name": "Deadline",
    "type": "date",
    "caption": "Deadline of the project"
  },
  "mycompany:actual-hours": {
    "name": "Actual Hours",
    "type": "text",
    "caption": "Actual number of hours this took."
  },
  "mycompany:company-jobs": {
    "name": "Work Type",
    "type": "select",
    "options": {
      "mycompany:engineer": "Engineer",
      "mycompany:designer": "Designer",
      "mycompany:qa": "Quality Assurance",
      "mycompany:other": "Non Technical"
    }
  },
  "mycompanyname:fieldname": {
    "name": "Blocked by task",
    "type": "users",
    "caption": "Add any dependency on other tasks",
    "required":false
  }
}

我在phabricator中为Blocked by task设置搜索字段时遇到问题。该字段应该按照type="users"

的方式搜索

我花了一整天时间尝试以多种方式实现此功能,例如

{
"mycompany:blocks-manifest": {
    "name": "Blocked By",
    "type": "text",
    "strings": {
        "search.default": "(ANY)"
    },
    "caption": "If there is any dependency, please specify",
    "options" :{
        "search.default": "(ANY)"
    }
  }
}

以及

{
  "mycompany:blocks-manifest": {
    "name": "Blocked By",
    "type": "search",
    "strings": {
        "search.default": "(ANY)"
    },
    "caption": "If there is any dependency, please specify"
  }
}

也是这样

{
  "mycompany:blocks-manifest": {
    "name": "Blocked By",
    "type": "text",
    "strings": search.default,
    "caption": "If there is any dependency, please specify"
  }
}

如果我总结一下自己,我已经在Phabricator文档中Configuring Custom Fields查看了这方面的文档,但没有收获。

有关如何修复或实现在maniphest.custom-field-definations下的phabricator中搜索先前任务的方法的任何线索?

非常鼓励来自任何一位phabricator的建议。

如果我必须通过Adding New Classes达到此目的,请为此提出建议。

1 个答案:

答案 0 :(得分:0)

您可以使用原生" Blocked By"或"块"默认情况下附带Maniphest的字段。这是最简单的选择。