{"id":6619,"date":"2021-01-11T10:34:44","date_gmt":"2021-01-11T01:34:44","guid":{"rendered":"http:\/\/54.178.87.26\/plugins-custom\/"},"modified":"2023-09-04T09:42:59","modified_gmt":"2023-09-04T00:42:59","slug":"plugins-custom","status":"publish","type":"page","link":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/702\/integrate\/defects\/plugins-custom\/","title":{"rendered":"\u6b20\u9665\uff1a\u30ab\u30b9\u30bf\u30e0\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u4f5c\u6210"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;4.4.2&#8243;][et_pb_row _builder_version=&#8221;4.4.2&#8243;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.2&#8243;][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221;]<\/p>\n<h1>\u6b20\u9665\uff1a\u30ab\u30b9\u30bf\u30e0\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u4f5c\u6210<\/h1>\n<p>TestRail \u306e\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u3001TestRail \u3092\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u306e\u30d0\u30b0\u304a\u3088\u3073\u8ab2\u984c\u8ffd\u8de1\u30c4\u30fc\u30eb\u3068\u7d71\u5408\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002TestRail \u306b\u306f\u3001\u591a\u304f\u306e\u4e00\u822c\u7684\u306a\u30c4\u30fc\u30eb\u3068\u306e\u7d71\u5408\u306b\u3059\u3050\u306b\u4f7f\u3048\u308b\u30d7\u30e9\u30b0\u30a4\u30f3 \u30b9\u30af\u30ea\u30d7\u30c8\u304c\u4ed8\u5c5e\u3057\u3066\u3044\u307e\u3059\u3002\u3057\u304b\u3057\u3001TestRail \u306b\u4ed8\u5c5e\u3057\u3066\u3044\u308b\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u3001\u6a19\u6e96\u7684\u306a\u69cb\u6210\u306e\u6b20\u9665\u8ffd\u8de1\u30c4\u30fc\u30eb\u3067\u52d5\u4f5c\u3059\u308b\u3088\u3046\u306b\u8a2d\u8a08\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u30cb\u30fc\u30ba\u306b\u5408\u308f\u305b\u3066\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u6b20\u9665\u8ffd\u8de1\u30c4\u30fc\u30eb\u304c\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3055\u308c\u3066\u3044\u308b\u5834\u5408 (\u305f\u3068\u3048\u3070\u3001\u65b0\u3057\u3044\u5fc5\u9808\u30ab\u30b9\u30bf\u30e0\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u306a\u3069)\u3001\u307e\u305f\u306f\u7d71\u5408\u306e\u52d5\u4f5c\u3092\u5909\u66f4\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u3053\u3068\u3082\u3001\u65b0\u3057\u3044\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u69cb\u7bc9\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u305f\u308a\u3001\u65b0\u3057\u3044\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f5c\u6210\u3057\u305f\u308a\u3059\u308b\u3068\u3001\u6b21\u306e\u3088\u3046\u306a\u5834\u5408\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>\u6b20\u9665\u8ffd\u8de1\u30c4\u30fc\u30eb\u306b\u5fc5\u9808\u30ab\u30b9\u30bf\u30e0 \u30d5\u30a3\u30fc\u30eb\u30c9\u304c\u8ffd\u52a0\u3055\u308c\u3066\u304a\u308a\u3001\u305d\u308c\u3089\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u3092 <strong>[\u6b20\u9665\u306e\u30d7\u30c3\u30b7\u30e5]<\/strong> \u30c0\u30a4\u30a2\u30ed\u30b0\u306b\u8ffd\u52a0\u3057\u305f\u3044\u5834\u5408\u3002<\/li>\n<li class=\"li\">\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u632f\u308b\u821e\u3044\u3092\u5909\u66f4\u3057\u305f\u3044\u5834\u5408 (\u305f\u3068\u3048\u3070\u3001\u30e6\u30fc\u30b6\u30fc \u30de\u30c3\u30d4\u30f3\u30b0\u3092\u8ffd\u52a0\u3057\u305f\u308a\u3001\u9001\u4fe1\u3055\u308c\u308b\u30d0\u30b0 \u30ec\u30dd\u30fc\u30c8\u306b\u60c5\u5831\u3092\u8ffd\u52a0\u3059\u308b\u306a\u3069)\u3002<\/li>\n<li class=\"li\">\u30ab\u30b9\u30bf\u30e0 \u30c4\u30fc\u30eb\/\u307e\u3060\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u30c4\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u3066\u304a\u308a\u3001\u305d\u306e\u30c4\u30fc\u30eb\u3068\u7d71\u5408\u3057\u305f\u3044\u5834\u5408\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u3053\u306e\u30da\u30fc\u30b8\u3067\u306f\u3001\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u57fa\u672c\u7684\u306a\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3068\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u306e\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002\u307e\u305f\u3001 [\u6b20\u9665\u306e\u30d7\u30c3\u30b7\u30e5] \u30c0\u30a4\u30a2\u30ed\u30b0\u306b\u65b0\u3057\u3044\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5\u3001\u304a\u3088\u3073\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u30e6\u30fc\u30b6\u30fc \u30de\u30c3\u30d4\u30f3\u30b0\u6a5f\u80fd\u3092\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5\u306e\u5177\u4f53\u7684\u306a<a href=\"\/integrate\/defects\/plugins-examples\" target=\"_blank\" rel=\"noopener\">\u30b5\u30f3\u30d7\u30eb<\/a>\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>[\/et_pb_text][et_pb_text admin_label=&#8221;Note&#8221; _builder_version=&#8221;4.4.2&#8243; background_color=&#8221;#ffffdd&#8221; custom_padding=&#8221;4px|4px|2px|6px|false|false&#8221; hover_enabled=&#8221;0&#8243; border_width_all=&#8221;1px&#8221; border_color_all=&#8221;#E1E163&#8243;]<\/p>\n<p>\u72ec\u81ea\u306e\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f5c\u6210\u3057\u305f\u3082\u306e\u3092\u4ed6\u306e\u30e6\u30fc\u30b6\u30fc\u3068\u5171\u6709\u3057\u305f\u3044\u5834\u5408\u3001<a href=\"https:\/\/github.com\/gurock\/testrail-custom\/tree\/master\/user-submitted\/defect-plugins\" target=\"_blank\" rel=\"noopener\">\u3053\u3061\u3089<\/a>\u306e\u30d1\u30d6\u30ea\u30c3\u30af\u306a GitHub \u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u30b3\u30f3\u30c8\u30ea\u30d3\u30e5\u30fc\u30c8\u3057\u3066\u3044\u305f\u3060\u3051\u307e\u3059\u3002<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section][et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;4.4.2&#8243;][et_pb_row _builder_version=&#8221;4.4.2&#8243;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.2&#8243;][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221;]<\/p>\n<h2>\u306f\u3058\u3081\u306b<\/h2>\n<p>\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306f PHP \u3067\u958b\u767a\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u72ec\u81ea\u306e\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u307e\u305f\u306f\u4f5c\u6210\u3059\u308b\u5834\u5408\u3001PHP \u306b\u3064\u3044\u3066\u306e\u57fa\u672c\u7684\u306a\u77e5\u8b58\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p>[\/et_pb_text][et_pb_text admin_label=&#8221;Note&#8221; _builder_version=&#8221;4.4.2&#8243; background_color=&#8221;#ffffdd&#8221; custom_padding=&#8221;4px|4px|2px|6px|false|false&#8221; border_width_all=&#8221;1px&#8221; border_color_all=&#8221;#E1E163&#8243;]<\/p>\n<p><strong>\u6ce8\u610f\uff1a<\/strong>\u30ab\u30b9\u30bf\u30e0\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u3064\u3044\u3066\u306f\u3001\u4f5c\u6210\u3055\u308c\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u95a2\u3059\u308b\u30a8\u30e9\u30fc\u306e\u8abf\u67fb\u3084\u89e3\u6c7a\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002PHP\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5b9f\u88c5\u7d4c\u9a13\u306e\u3042\u308b\u65b9\u306e\u652f\u63f4\u3092\u304a\u9858\u3044\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>[\/et_pb_text][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221;]<\/p>\n<p>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u521d\u671f\u5316\u6642\u306b TestRail \u304c\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u63a2\u3059\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306f 2 \u3064\u3042\u308a\u307e\u3059\u3002\u6700\u521d\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306f\u3001TestRail \u7d44\u307f\u8fbc\u307f\u306e\u30c7\u30d5\u30a9\u30eb\u30c8 \u30d7\u30e9\u30b0\u30a4\u30f3\u3082\u4fdd\u5b58\u3055\u308c\u308b\u5834\u6240\u3067\u3059\u3002TestRail \u3092\u66f4\u65b0\u3059\u308b\u3068\u3053\u308c\u3089\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u4e0a\u66f8\u304d\u3055\u308c\u308b\u305f\u3081\u3001\u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e\u30d7\u30e9\u30b0\u30a4\u30f3 \u30b9\u30af\u30ea\u30d7\u30c8\u3092\u8ffd\u52a0\u307e\u305f\u306f\u5909\u66f4\u3057\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>[\/et_pb_text][et_pb_text admin_label=&#8221;Code Sample&#8221; _builder_version=&#8221;4.4.2&#8243; background_color=&#8221;#ECF6FF&#8221; custom_padding=&#8221;4px|4px|2px|6px|false|false&#8221; border_width_all=&#8221;1px&#8221; border_color_all=&#8221;#C7DBEF&#8221;]<\/p>\n<pre>&lt;TestRail&gt;\/app\/plugins\/defects<\/pre>\n<p>[\/et_pb_text][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221;]<\/p>\n<p>\u5909\u66f4\u307e\u305f\u306f\u65b0\u898f\u8ffd\u52a0\u3055\u308c\u305f\u30d7\u30e9\u30b0\u30a4\u30f3 \u30b9\u30af\u30ea\u30d7\u30c8\u306f\u3001\u5e38\u306b\u30ab\u30b9\u30bf\u30e0\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u914d\u7f6e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>[\/et_pb_text][et_pb_text admin_label=&#8221;Code Sample&#8221; _builder_version=&#8221;4.4.2&#8243; background_color=&#8221;#ECF6FF&#8221; custom_padding=&#8221;4px|4px|2px|6px|false|false&#8221; hover_enabled=&#8221;0&#8243; border_width_all=&#8221;1px&#8221; border_color_all=&#8221;#C7DBEF&#8221;]<\/p>\n<pre>&lt;TestRail&gt;\/custom\/defects<\/pre>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section][et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;4.4.2&#8243;][et_pb_row _builder_version=&#8221;4.4.2&#8243;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.2&#8243;][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221; hover_enabled=&#8221;0&#8243;]<\/p>\n<h2>\u30d7\u30e9\u30b0\u30a4\u30f3 \u30d5\u30a1\u30a4\u30eb<\/h2>\n<p>\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u3001 TestRail \u304c\u6b20\u9665\u8ffd\u8de1\u30c4\u30fc\u30eb\u3068\u306e\u901a\u4fe1\u306b\u4f7f\u7528\u3059\u308b\u30af\u30e9\u30b9\u3092\u5b9f\u88c5\u3057\u305f\u5358\u7d14\u306a PHP \u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3059\u3002\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u305f\u308a\u72ec\u81ea\u306e\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f5c\u6210\u3059\u308b\u5834\u5408\u3001\u4e0a\u8a18\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304b\u3089\u30ab\u30b9\u30bf\u30e0\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3 \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u65e2\u5b58\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u30b3\u30d4\u30fc\u3057\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u540d\u524d\u3092\u5909\u66f4\u3057\u3066\u5229\u7528\u3067\u304d\u307e\u3059\u3002\u3042\u308b\u3044\u306f\u3001\u4ee5\u4e0b\u306e\u30b9\u30af\u30ea\u30d7\u30c8 \u30b9\u30b1\u30eb\u30c8\u30f3\u304b\u3089\u59cb\u3081\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u305f\u3068\u3048\u3070\u3001TestRail \u306e Jira \u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u305f\u3044\u5834\u5408\u306f\u3001<strong>&lt;TestRail&gt;\/app\/plugins\/defects<\/strong> \u304b\u3089 <strong>&lt;TestRail&gt;\/custom\/defects<\/strong> \u306b\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002TestRail \u306f\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u4e00\u610f\u306e (\u30af\u30e9\u30b9) \u8b58\u5225\u5b50\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u305f\u3081\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u540d\u524d\u3092\u5909\u66f4\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u30d5\u30a1\u30a4\u30eb\u540d\u3092 Jira_ExampleInc.php \u306b\u5909\u66f4\u3057\u3066\u3001\u7d44\u7e54\u306e\u540d\u524d\u307e\u305f\u306f TestRail \u3068\u7d71\u5408\u3057\u305f\u3044\u30ab\u30b9\u30bf\u30e0 \u30c4\u30fc\u30eb\u306e\u540d\u524d\u3092\u542b\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30d5\u30a1\u30a4\u30eb\u540d\u3068\u4e00\u81f4\u3059\u308b\u3088\u3046\u306b\u6b20\u9665\u30af\u30e9\u30b9\u540d\u3092\u8abf\u6574\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306f\u3001\u6b21\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section][et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;4.4.2&#8243;][et_pb_row _builder_version=&#8221;4.4.2&#8243;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.2&#8243;][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221;]<\/p>\n<h2>\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u57fa\u672c<\/h2>\n<p>\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u3001 TestRail \u304c\u6b20\u9665\u8ffd\u8de1\u30c4\u30fc\u30eb\u3068\u306e\u901a\u4fe1\u306b\u4f7f\u7528\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u88c5\u3057\u305f\u5358\u7d14\u306a PHP \u30af\u30e9\u30b9\u3067\u3059\u3002TestRail \u306f\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u4e00\u610f\u306e\u8b58\u5225\u5b50\u3068\u3057\u3066\u4f7f\u7528\u3057\u307e\u3059\u3002\u30d7\u30e9\u30b0\u30a4\u30f3 \u30af\u30e9\u30b9\u540d\u306f\u30d5\u30a1\u30a4\u30eb\u540d\u306b\u57fa\u3065\u3044\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u30d7\u30e9\u30b0\u30a4\u30f3 \u30b9\u30af\u30ea\u30d7\u30c8 \u30d5\u30a1\u30a4\u30eb\u306e\u540d\u524d\u304c <strong>Jira.php<\/strong> \u3067\u3042\u308b\u5834\u5408\u3001\u30d7\u30e9\u30b0\u30a4\u30f3 \u30af\u30e9\u30b9\u540d\u306f <strong>Jira_defect_plugin<\/strong> \u3068\u3044\u3046\u540d\u524d\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3059\u3079\u3066\u306e\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3 \u30af\u30e9\u30b9\u306f TestRail \u306e <strong>Defect_plugin<\/strong> \u57fa\u5e95\u30af\u30e9\u30b9\u3092\u62e1\u5f35\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u6b21\u306e\u30af\u30e9\u30b9 \u30b9\u30b1\u30eb\u30c8\u30f3\u306f\u3001\u3059\u3079\u3066\u306e\u57fa\u5e95\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u88c5\u3057\u3001\u57fa\u672c\u7684\u306a\u30e1\u30bd\u30c3\u30c9\u3068\u5f15\u6570\u3092\u8aac\u660e\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>[\/et_pb_text][et_pb_code _builder_version=&#8221;4.4.2&#8243;]<\/p>\n<pre class=\"language-php\"><code class=\"language-php\"><!-- [et_pb_line_break_holder] -->\/\/ MyPlugin.php<!-- [et_pb_line_break_holder] -->class MyPlugin_defect_plugin extends Defect_plugin<!-- [et_pb_line_break_holder] -->{<!-- [et_pb_line_break_holder] -->\t\/\/ Get Meta<!-- [et_pb_line_break_holder] -->\t\/\/<!-- [et_pb_line_break_holder] -->\t\/\/ Expected to return meta data for this plugin such as Author,<!-- [et_pb_line_break_holder] -->\t\/\/ Version, Description and supported plugin capabilities.<!-- [et_pb_line_break_holder] -->\tpublic function get_meta()<!-- [et_pb_line_break_holder] -->\t{<!-- [et_pb_line_break_holder] -->\t}<!-- [et_pb_line_break_holder] -->\u00a0<!-- [et_pb_line_break_holder] -->\t\/\/ Validate Config<!-- [et_pb_line_break_holder] -->\t\/\/<!-- [et_pb_line_break_holder] -->\t\/\/ Validates the plugin configuration that is entered in the site<!-- [et_pb_line_break_holder] -->\t\/\/ or project settings. Expected to throw a ValidationException<!-- [et_pb_line_break_holder] -->\t\/\/ in case the passed configuration does not validate.<!-- [et_pb_line_break_holder] -->\tpublic function validate_config($config)<!-- [et_pb_line_break_holder] -->\t{<!-- [et_pb_line_break_holder] -->\t}<!-- [et_pb_line_break_holder] -->\u00a0<!-- [et_pb_line_break_holder] -->\t\/\/ Configure<!-- [et_pb_line_break_holder] -->\t\/\/<!-- [et_pb_line_break_holder] -->\t\/\/ Passes the configuration for the plugin as specified in the<!-- [et_pb_line_break_holder] -->\t\/\/ site or project settings (as string).<!-- [et_pb_line_break_holder] -->\tpublic function configure($config)<!-- [et_pb_line_break_holder] -->\t{<!-- [et_pb_line_break_holder] -->\t}<!-- [et_pb_line_break_holder] -->\u00a0<!-- [et_pb_line_break_holder] -->\t\/\/ Prepare Push<!-- [et_pb_line_break_holder] -->\t\/\/<!-- [et_pb_line_break_holder] -->\t\/\/ Signals if the plugin requires\/supports a form to submit the<!-- [et_pb_line_break_holder] -->\t\/\/ defect. Returns 'false' to signal that no form is required.<!-- [et_pb_line_break_holder] -->\t\/\/ Otherwise the plugin should return the form description that<!-- [et_pb_line_break_holder] -->\t\/\/ is used to render the form and display it to the user.<!-- [et_pb_line_break_holder] -->\tpublic function prepare_push($context)<!-- [et_pb_line_break_holder] -->\t{<!-- [et_pb_line_break_holder] -->\t}<!-- [et_pb_line_break_holder] -->\u00a0<!-- [et_pb_line_break_holder] -->\t\/\/ Prepare Field<!-- [et_pb_line_break_holder] -->\t\/\/<!-- [et_pb_line_break_holder] -->\t\/\/ Called for each field of the push form to gather the field<!-- [et_pb_line_break_holder] -->\t\/\/ data for the form. The plugin can return default values or<!-- [et_pb_line_break_holder] -->\t\/\/ available options for the field (in case of a dropdown<!-- [et_pb_line_break_holder] -->\t\/\/ box, for example), among other values.<!-- [et_pb_line_break_holder] -->\tpublic function prepare_field($context, $input, $field)<!-- [et_pb_line_break_holder] -->\t{<!-- [et_pb_line_break_holder] -->\t}<!-- [et_pb_line_break_holder] -->\u00a0<!-- [et_pb_line_break_holder] -->\t\/\/ Validate Push<!-- [et_pb_line_break_holder] -->\t\/\/<!-- [et_pb_line_break_holder] -->\t\/\/ Called before the actual push attempt is processed (in case<!-- [et_pb_line_break_holder] -->\t\/\/ the plugin uses a custom form). Useful for adding custom<!-- [et_pb_line_break_holder] -->\t\/\/ validation functionality for the form that is not covered by<!-- [et_pb_line_break_holder] -->\t\/\/ TestRail itself. Expected to throw a ValidationException in<!-- [et_pb_line_break_holder] -->\t\/\/ case the passed input of the custom form does not validate.<!-- [et_pb_line_break_holder] -->\tpublic function validate_push($context, $input)<!-- [et_pb_line_break_holder] -->\t{<!-- [et_pb_line_break_holder] -->\t}<!-- [et_pb_line_break_holder] -->\u00a0<!-- [et_pb_line_break_holder] -->\t\/\/ Push<!-- [et_pb_line_break_holder] -->\t\/\/<!-- [et_pb_line_break_holder] -->\t\/\/ Executes the actual push request by adding a new case to the<!-- [et_pb_line_break_holder] -->\t\/\/ defect tracker. Expected to return the new defect ID (as<!-- [et_pb_line_break_holder] -->\t\/\/ string or integer).<!-- [et_pb_line_break_holder] -->\tpublic function push($context, $input)<!-- [et_pb_line_break_holder] -->\t{<!-- [et_pb_line_break_holder] -->\t}<!-- [et_pb_line_break_holder] -->\u00a0<!-- [et_pb_line_break_holder] -->\t\/\/ Lookup<!-- [et_pb_line_break_holder] -->\t\/\/<!-- [et_pb_line_break_holder] -->\t\/\/ Looks up the defect\/issue\/case with the given ID and returns<!-- [et_pb_line_break_holder] -->\t\/\/ its properties as key\/value array. The following return values<!-- [et_pb_line_break_holder] -->\t\/\/ are required:<!-- [et_pb_line_break_holder] -->\t\/\/ <!-- [et_pb_line_break_holder] -->\t\/\/ id:           The ID of the defect (usually the same as the<!-- [et_pb_line_break_holder] -->\t\/\/               passed ID)<!-- [et_pb_line_break_holder] -->\t\/\/ title:        The title\/summary of the defect<!-- [et_pb_line_break_holder] -->\t\/\/ status_id:    The status ID of the defect. Possible values<!-- [et_pb_line_break_holder] -->\t\/\/               are:<!-- [et_pb_line_break_holder] -->\t\/\/               - GI_DEFECTS_STATUS_OPEN<!-- [et_pb_line_break_holder] -->\t\/\/               - GI_DEFECTS_STATUS_RESOLVED<!-- [et_pb_line_break_holder] -->\t\/\/               - GI_DEFECTS_STATUS_CLOSED<!-- [et_pb_line_break_holder] -->\t\/\/ status:       The status as text<!-- [et_pb_line_break_holder] -->\t\/\/ \t             <!-- [et_pb_line_break_holder] -->\t\/\/<!-- [et_pb_line_break_holder] -->\t\/\/ The following properties are optional:<!-- [et_pb_line_break_holder] -->\t\/\/<!-- [et_pb_line_break_holder] -->\t\/\/ url:          The full HTTP url to view the defect<!-- [et_pb_line_break_holder] -->\t\/\/ description:  The description of the defect (supports HTML,<!-- [et_pb_line_break_holder] -->\t\/\/               the plugin is responsible for providing well-<!-- [et_pb_line_break_holder] -->\t\/\/               formed and valid HTML and must escape data<!-- [et_pb_line_break_holder] -->\t\/\/               that is not expected to be rendered as HTML).<!-- [et_pb_line_break_holder] -->\t\/\/ attributes:   A key\/value list of additional attributes.<!-- [et_pb_line_break_holder] -->\t\/\/               The value also supports HTML with the same<!-- [et_pb_line_break_holder] -->\t\/\/               implications as for the description.<!-- [et_pb_line_break_holder] -->\tpublic function lookup($defect_id)<!-- [et_pb_line_break_holder] -->\t{<!-- [et_pb_line_break_holder] -->\t}<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><\/code><\/pre>\n<p>[\/et_pb_code][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221; hover_enabled=&#8221;0&#8243;]<\/p>\n<p>\u305f\u3060\u3057\u3001\u5fc5\u305a\u3057\u3082\u3059\u3079\u3066\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u5b8c\u5168\u306b\u5b9f\u88c5\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u306f (\u73fe\u5728\u306e\u3068\u3053\u308d) 2 \u3064\u306e\u6a5f\u80fd\u304c\u3042\u308a\u307e\u3059\u3002\u6b20\u9665\u3092\u5916\u90e8\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u3053\u3068\u3068\u6b20\u9665\u60c5\u5831\u3092\u691c\u7d22\u3059\u308b\u3053\u3068\u3067\u3059\u3002\u4f5c\u6210\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\u3084\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306b\u3088\u3063\u3066\u306f\u3001\u3053\u308c\u3089\u306e\u6a5f\u80fd\u306e\u3046\u3061\u306e 1 \u3064\u3060\u3051\u3092\u5b9f\u88c5\u3059\u308b\u3053\u3068\u304c\u7406\u306b\u304b\u306a\u3063\u3066\u3044\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u305f\u3068\u3048\u3070\u3001\u30c6\u30b9\u30bf\u30fc\u304c [\u6b20\u9665\u306e\u30d7\u30c3\u30b7\u30e5] \u30c0\u30a4\u30a2\u30ed\u30b0\u304b\u3089\u96fb\u5b50\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u5b9f\u88c5\u3059\u308b\u5834\u5408\u3001\u691c\u7d22\u6a5f\u80fd\u3092\u5b9f\u88c5\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u540c\u69d8\u306b\u3001\u6b20\u9665\u8ffd\u8de1\u30c4\u30fc\u30eb\u304b\u3089\u6b20\u9665\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u304c\u3001\u30d0\u30b0 \u30ec\u30dd\u30fc\u30c8 \u30d5\u30a9\u30fc\u30e0\u306f\u6b20\u9665\u8ffd\u8de1\u30c4\u30fc\u30eb\u306e\u3082\u306e\u3092\u4f7f\u7528\u3057\u305f\u3044\u5834\u5408\u306f\u3001\u30d7\u30c3\u30b7\u30e5\u6a5f\u80fd\u3092\u5b9f\u88c5\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u975e\u5e38\u306b\u67d4\u8edf\u3067\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u73fe\u5728 TestRail \u306b\u4ed8\u5c5e\u3057\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u3001\u30c6\u30b9\u30bf\u30fc\u304c\u5165\u529b\u6e08\u307f\u306e\u30d0\u30b0 \u30ec\u30dd\u30fc\u30c8\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3067\u304d\u308b\u3088\u3046\u30c0\u30a4\u30a2\u30ed\u30b0\u3092\u8868\u793a\u3057\u307e\u3059\u304c\u3001\u30c0\u30a4\u30a2\u30ed\u30b0\u306e\u8868\u793a\u306f\u5fc5\u9808\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u4ecb\u5165\u306a\u3057\u306b\u30d0\u30c3\u30af\u30b0\u30e9\u30a6\u30f3\u30c9\u3067\u81ea\u52d5\u7684\u306b\u30d0\u30b0 \u30ec\u30dd\u30fc\u30c8\u3092\u9001\u4fe1\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section][et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;4.4.2&#8243;][et_pb_row _builder_version=&#8221;4.4.2&#8243;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.2&#8243;][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221;]<\/p>\n<h2>\u72ec\u81ea\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u69cb\u7bc9\u3059\u308b<\/h2>\n<p>\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f5c\u6210\u3059\u308b\u624b\u9806\u3092\u8a73\u3057\u304f\u8aac\u660e\u3057\u3001\u3055\u307e\u3056\u307e\u306a\u30d7\u30e9\u30b0\u30a4\u30f3 \u30e1\u30bd\u30c3\u30c9\u3068\u7279\u5fb4\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002\u72ec\u81ea\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4e00\u304b\u3089\u4f5c\u6210\u3059\u308b\u4e88\u5b9a\u306f\u306a\u304f\u3001\u5358\u306b\u65e2\u5b58\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u305f\u3044\u5834\u5408\u3082\u3001\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u53c2\u7167\u3059\u308b\u3053\u3068\u306f\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u5185\u90e8\u306e\u4ed5\u7d44\u307f\u306b\u3064\u3044\u3066\u5b66\u3076\u305f\u3081\u306e\u6700\u826f\u306e\u65b9\u6cd5\u3067\u3059\u3002\u3053\u3053\u3067\u306f\u3001\u67b6\u7a7a\u306e\u30d0\u30b0\u8ffd\u8de1\u30c4\u30fc\u30eb Bugs \u7528\u306e\u65b0\u3057\u3044\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u4ee5\u964d\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u306f\u3001\u65b0\u3057\u3044\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f5c\u6210\u3059\u308b\u624b\u9806\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<p>\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u4f5c\u6210\u3092\u59cb\u3081\u308b\u524d\u306b\u3001TestRail \u306f\u3059\u3079\u3066\u306e\u6587\u5b57\u5217\u3068\u30c6\u30ad\u30b9\u30c8\u304c UTF-8 \u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3067\u3042\u308b\u3068\u671f\u5f85\u3059\u308b (\u305d\u3057\u3066 TestRail \u304c\u63d0\u4f9b\u3059\u308b\u30c6\u30ad\u30b9\u30c8\u3082 UTF-8 \u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3067\u3042\u308b) \u3053\u3068\u306b\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002\u3064\u307e\u308a\u3001TestRail \u306b\u8fd4\u5374\u3059\u308b (\u307e\u305f\u306f TestRail \u304b\u3089\u53d7\u3051\u53d6\u308b) \u3059\u3079\u3066\u306e\u6587\u5b57\u5217\u3068\u30c6\u30ad\u30b9\u30c8\u306f UTF-8 \u3067\u30a8\u30f3\u30b3\u30fc\u30c9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u6b27\u7c73\u4ee5\u5916\u306e\u6587\u5b57\u3092\u51e6\u7406\u3059\u308b\u5834\u5408\u306f\u7279\u306b\u91cd\u8981\u3067\u3059\u304c\u3001ASCII \u4ee5\u5916\u306e\u7279\u6b8a\u6587\u5b57\u306a\u3069\u3082\u8003\u616e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row _builder_version=&#8221;4.4.2&#8243;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.2&#8243;][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221;]<\/p>\n<h2>\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210<\/h2>\n<p>\u65b0\u3057\u3044\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f5c\u6210\u3059\u308b\u969b\u306e\u6700\u521d\u306e\u30b9\u30c6\u30c3\u30d7\u306f\u3001\u30b9\u30af\u30ea\u30d7\u30c8 \u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210\u3067\u3059\u3002\u3053\u306e\u4f8b\u3067\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u540d\u3092 <strong>Bugs.php<\/strong> \u3068\u3057\u3001TestRail \u306e\u30ab\u30b9\u30bf\u30e0 \u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea (<strong>&lt;TestRail&gt;\/custom\/defects<\/strong>) \u306b\u914d\u7f6e\u3057\u307e\u3059\u3002\u65e2\u5b58\u306e\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u5229\u7528\u3059\u308b\u5834\u5408 (\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u3059\u3079\u3066\u5b8c\u5168\u306a\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3067\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u3059\u3002<strong> &lt;TestRail&gt;\/app\/plugins\/defects<\/strong> \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u3042\u308a\u307e\u3059)\u3001\u305d\u308c\u3092\u30ab\u30b9\u30bf\u30e0\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30b3\u30d4\u30fc\u3057\u3066\u540d\u524d\u3092\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<strong>Bugs<\/strong>\u306e\u57fa\u672c\u7684\u306a\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059 (&lt;?php \u30bf\u30b0\u3092\u30d5\u30a1\u30a4\u30eb\u306e\u6700\u5f8c\u3067\u9589\u3058\u306a\u3044\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30d5\u30a1\u30a4\u30eb\u672b\u5c3e\u306e\u7a7a\u306e\u884c\u306b\u3088\u3063\u3066 PHP \u306e\u30d8\u30c3\u30c0\u30fc\u51fa\u529b\u304c\u58ca\u308c\u308b\u306e\u3092\u9632\u304e\u307e\u3059)\u3002<\/p>\n<p>[\/et_pb_text][et_pb_code _builder_version=&#8221;4.4.2&#8243;]<\/p>\n<pre class=\"language-php\"><code class=\"language-php\"><!-- [et_pb_line_break_holder] -->class Bugs_defect_plugin extends Defect_plugin<!-- [et_pb_line_break_holder] -->{<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><\/code><\/pre>\n<p>[\/et_pb_code][\/et_pb_column][\/et_pb_row][et_pb_row _builder_version=&#8221;4.4.2&#8243;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.2&#8243;][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221;]<\/p>\n<h2>\u30e1\u30bf \u30c7\u30fc\u30bf\u3092\u8fd4\u3059<\/h2>\n<p>\u6700\u521d\u306b\u5b9f\u88c5\u3059\u308b\u306e\u306f <strong>get_meta<\/strong> \u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u4f5c\u6210\u8005\u306e\u540d\u524d\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3001\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u6a5f\u80fd\u3001\u8a2d\u5b9a\u306e\u8a73\u7d30\u306a\u3069\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u95a2\u3059\u308b\u60c5\u5831\u3092 TestRail \u306b\u901a\u77e5\u3057\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u6b21\u306e\u3088\u3046\u306b\u3001\u60c5\u5831\u3092\u542b\u3080\u914d\u5217\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p>[\/et_pb_text][et_pb_code _builder_version=&#8221;4.4.2&#8243;]<\/p>\n<pre class=\"language-php\"><code class=\"language-php\"><!-- [et_pb_line_break_holder] -->{<!-- [et_pb_line_break_holder] -->\treturn array(<!-- [et_pb_line_break_holder] -->\t\t'author' =&gt; 'Example Inc.',<!-- [et_pb_line_break_holder] -->\t\t'version' =&gt; '1.0',<!-- [et_pb_line_break_holder] -->\t\t'description' =&gt; 'Bugs defect plugin for TestRail',<!-- [et_pb_line_break_holder] -->\t\t'can_push' =&gt; false,<!-- [et_pb_line_break_holder] -->\t\t'can_lookup' =&gt; false,<!-- [et_pb_line_break_holder] -->\t\t'default_config' =&gt; <!-- [et_pb_line_break_holder] -->\t\t\t\"; Please configure your Bugs connection belown\\n\" .<!-- [et_pb_line_break_holder] -->\t\t\t\"[connection]\\n\" .<!-- [et_pb_line_break_holder] -->\t\t\t\"address=http:\/\/&lt;yourserver&gt;\/\\n\" .<!-- [et_pb_line_break_holder] -->\t\t\t\"user=testrail\\n\" .<!-- [et_pb_line_break_holder] -->\t\t\t\"password=secret\"<!-- [et_pb_line_break_holder] -->\t);<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><\/code><\/pre>\n<p>[\/et_pb_code][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221; hover_enabled=&#8221;0&#8243;]<\/p>\n<p>\u7279\u306b\u91cd\u8981\u306a\u306e\u306f <strong>can_push<\/strong> \u304a\u3088\u3073 <strong>can_lookup<\/strong> \u30d7\u30ed\u30d1\u30c6\u30a3\u3067\u3059\u3002\u3053\u308c\u3089\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306f\u3001\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u3069\u306e\u6a5f\u80fd\u3092\u5b9f\u88c5\u3057\u3066\u3044\u308b\u304b\u3092 TestRail \u306b\u4f1d\u3048\u307e\u3059\u3002\u73fe\u6642\u70b9\u3067\u306f \u30d7\u30c3\u30b7\u30e5 \u6a5f\u80fd\u3068 \u691c\u7d22 \u6a5f\u80fd\u3057\u304b\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u4eca\u5f8c\u306e TestRail \u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u65b0\u3057\u3044\u6a5f\u80fd\u304c\u8ffd\u52a0\u3055\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><strong>default_config<\/strong> \u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u3082\u6ce8\u76ee\u3059\u3079\u304d\u3067\u3059\u3002\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u3001<strong> [\u7ba1\u7406] &gt; [\u7d71\u5408]<\/strong> \u306e\u4e0b\u3067\u30b0\u30ed\u30fc\u30d0\u30eb\u306b\u3001\u307e\u305f\u306f<strong> [\u7ba1\u7406] &gt; [\u30d7\u30ed\u30b8\u30a7\u30af\u30c8]<\/strong> \u306e\u4e0b\u3067\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3054\u3068\u306b\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u3002\u7ba1\u7406\u8005\u304c\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u8a2d\u5b9a\u3059\u308b\u3068\u304d\u3001<strong>default_config<\/strong> \u3067\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u30c7\u30d5\u30a9\u30eb\u30c8\u8a2d\u5b9a\u304c\u8a2d\u5b9a\u30c6\u30ad\u30b9\u30c8 \u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u30ed\u30fc\u30c9\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row _builder_version=&#8221;4.4.2&#8243;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.2&#8243;][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221;]<\/p>\n<h2>\u8a2d\u5b9a<\/h2>\n<p>\u901a\u5e38\u3001\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u306f\u6b20\u9665\u8ffd\u8de1\u30b7\u30b9\u30c6\u30e0\u306e\u30a2\u30c9\u30ec\u30b9\u3001\u30e6\u30fc\u30b6\u30fc\u540d\u304a\u3088\u3073\u30d1\u30b9\u30ef\u30fc\u30c9\u306a\u3069\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u7ba1\u7406\u8005\u304c TestRail \u3067\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u8a2d\u5b9a\u3059\u308b\u969b\u3001\u30c6\u30ad\u30b9\u30c8 \u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u4f7f\u7528\u3057\u3066\u8a2d\u5b9a\u3092\u5165\u529b\u3057\u307e\u3059\u3002\u30c6\u30ad\u30b9\u30c8 \u30d5\u30a3\u30fc\u30eb\u30c9\u306f\u3055\u307e\u3056\u307e\u306a\u8868\u8a18\u6cd5 (INI \u30aa\u30d7\u30b7\u30e7\u30f3\u3001XML \u306a\u3069) \u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u72ec\u81ea\u306e\u8a2d\u5b9a\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>TestRail \u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u3001\u8a2d\u5b9a\u306b INI \u30d5\u30a1\u30a4\u30eb\u8868\u8a18\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u3001<strong>[sections]<\/strong> \u3068 <strong>name=value<\/strong> \u30da\u30a2\u3092\u4f7f\u7528\u3057\u3066\u8a2d\u5b9a\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002TestRail \u306f INI \u8868\u8a18\u3055\u308c\u305f\u8a2d\u5b9a\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u8aad\u307f\u53d6\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u5099\u3048\u3066\u3044\u308b\u305f\u3081\u3001\u901a\u5e38\u306f INI \u8868\u8a18\u3092\u4f7f\u3046\u3053\u3068\u304c\u63a8\u5968\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u7ba1\u7406\u8005\u304c\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u8a2d\u5b9a\u3059\u308b\u3068\u3001TestRail \u306f\u5165\u529b\u3055\u308c\u305f\u8a2d\u5b9a\u3092\u78ba\u8a8d\u3059\u308b\u3088\u3046\u306b\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u8981\u6c42\u3057\u307e\u3059\u3002TestRail \u306f\u5fc5\u8981\u306a\u8a2d\u5b9a (\u3042\u308b\u3044\u306f\u8a2d\u5b9a\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3055\u3048) \u306b\u3064\u3044\u3066\u306e\u60c5\u5831\u3092\u6301\u3063\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u3059\u3079\u3066\u306e\u5fc5\u8981\u306a\u8a2d\u5b9a\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u691c\u8a3c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001TestRail \u306f\u7ba1\u7406\u8005\u304c\u8a2d\u5b9a\u3092\u5909\u66f4\u3057\u3088\u3046\u3068\u3059\u308b\u305f\u3073\u306b <strong>validate_config<\/strong> \u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3057\u307e\u3059\u3002<\/p>\n<p>[\/et_pb_text][et_pb_code _builder_version=&#8221;4.4.2&#8243;]<\/p>\n<pre class=\"language-php\"><code class=\"language-php\"><!-- [et_pb_line_break_holder] -->public function validate_config($config)<!-- [et_pb_line_break_holder] -->{<!-- [et_pb_line_break_holder] -->\t$ini = ini::parse($config);<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->\t\/\/ Check if the [connection] section exists<!-- [et_pb_line_break_holder] -->\tif (!isset($ini['connection']))<!-- [et_pb_line_break_holder] -->\t{<!-- [et_pb_line_break_holder] -->\t\tthrow new ValidationException('Missing [connection] group');<!-- [et_pb_line_break_holder] -->\t}<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->\t\/\/ Check if the required values exist<!-- [et_pb_line_break_holder] -->\t$keys = array('address', 'user', 'password');<!-- [et_pb_line_break_holder] -->\tforeach ($keys as $key)<!-- [et_pb_line_break_holder] -->\t{<!-- [et_pb_line_break_holder] -->\t\tif (!isset($ini['connection'][$key]) ||<!-- [et_pb_line_break_holder] -->\t\t\t!$ini['connection'][$key])<!-- [et_pb_line_break_holder] -->\t\t{<!-- [et_pb_line_break_holder] -->\t\t\tthrow new ValidationException(<!-- [et_pb_line_break_holder] -->\t\t\t\t\"Missing configuration for key '$key'\"<!-- [et_pb_line_break_holder] -->\t\t\t);<!-- [et_pb_line_break_holder] -->\t\t}<!-- [et_pb_line_break_holder] -->\t}<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->\t$address = $ini['connection']['address'];<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->\t\/\/ Check whether the address is a valid url (syntax only)<!-- [et_pb_line_break_holder] -->\tif (!check::url($address))<!-- [et_pb_line_break_holder] -->\t{<!-- [et_pb_line_break_holder] -->\t\tthrow new ValidationException('Address is not a valid url');<!-- [et_pb_line_break_holder] -->\t}<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><\/code><\/pre>\n<p>[\/et_pb_code][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221;]<\/p>\n<p>\u4e0a\u8a18\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001<strong>[connection]<\/strong> \u30bb\u30af\u30b7\u30e7\u30f3\u304c\u5b58\u5728\u3057\u3001\u30bb\u30af\u30b7\u30e7\u30f3\u306b <strong>address<\/strong>\u3001<strong>user<\/strong>\u3001\u304a\u3088\u3073 <strong>password<\/strong> \u30ad\u30fc\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u307e\u305f\u3001<strong>password<\/strong> \u30ad\u30fc\u306b\u6709\u52b9\u306a URL \u304c\u542b\u307e\u308c\u3066\u3044\u308b\u3053\u3068\u3092 (<strong>check::url<\/strong> \u30eb\u30fc\u30c1\u30f3\u3092\u4f7f\u7528\u3057\u3066) \u78ba\u8a8d\u3057\u307e\u3059\u3002\u307e\u305f\u3001\u30e1\u30bd\u30c3\u30c9\u306e\u5192\u982d\u3067 TestRail \u306e <strong>ini<\/strong> \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u3066\u8a2d\u5b9a\u3092\u89e3\u6790\u3057\u3066\u3044\u308b\u3053\u3068\u306b\u3082\u6ce8\u76ee\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30e1\u30bd\u30c3\u30c9\u304c\u8a2d\u5b9a\u306e\u554f\u984c (\u30ad\u30fc\u306e\u6b20\u843d\u3001\u7121\u52b9\u306a\u5024\u306a\u3069) \u3092\u691c\u51fa\u3057\u305f\u5834\u5408\u3001<strong>ValidationException<\/strong> \u578b\u306e\u4f8b\u5916\u3092\u4e0a\u3052\u307e\u3059\u3002\u3059\u308b\u3068\u3001TestRail \u304c\u7ba1\u7406\u8005\u306b\u30a8\u30e9\u30fc \u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3057\u307e\u3059\u3002<\/p>\n<p>\u8a2d\u5b9a\u304c\u5b8c\u4e86\u3057\u305f\u3089\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u8a2d\u5b9a\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u65b9\u6cd5\u304c\u5fc5\u8981\u3067\u3059\u3002TestRail \u306f\u3001\u6b20\u9665\u30af\u30e9\u30b9\u304c\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3055\u308c\u308b\u305f\u3073\u306b\u81ea\u52d5\u7684\u306bconfigure \u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3057\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001TestRail \u306f\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u6b20\u9665 ID \u306e\u691c\u7d22\u3092\u4f9d\u983c\u3059\u308b\u524d\u306b configure \u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3057\u3066\u3001\u5fc5\u8981\u306a\u3059\u3079\u3066\u306e\u8a2d\u5b9a\u3092\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u63d0\u4f9b\u3057\u307e\u3059\u3002\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u30a2\u30af\u30c6\u30a3\u30d6\u3067\u3042\u308b\u9593\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u3053\u308c\u3089\u306e\u8a2d\u5b9a\u3092\u4fdd\u6301\u3057\u3001\u30e1\u30bd\u30c3\u30c9\u304c\u547c\u3073\u51fa\u3055\u308c\u305f\u3068\u304d\u306b\u8a2d\u5b9a\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306b\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u306f\u901a\u5e38\u3001\u8a2d\u5b9a\u3092\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5909\u6570\u306b\u683c\u7d0d\u3057\u307e\u3059\u3002<\/p>\n<p>[\/et_pb_text][et_pb_code _builder_version=&#8221;4.4.2&#8243;]<\/p>\n<pre class=\"language-php\"><code class=\"language-php\"><!-- [et_pb_line_break_holder] -->public function configure($config)<!-- [et_pb_line_break_holder] -->{<!-- [et_pb_line_break_holder] -->\t$ini = ini::parse($config);<!-- [et_pb_line_break_holder] -->\t$this-&gt;_address = str::slash($ini['connection']['address']);<!-- [et_pb_line_break_holder] -->\t$this-&gt;_user = $ini['connection']['user'];<!-- [et_pb_line_break_holder] -->\t$this-&gt;_password = $ini['connection']['password'];\t<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><\/code><\/pre>\n<p>[\/et_pb_code][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221; hover_enabled=&#8221;0&#8243;]<\/p>\n<p>\u30e1\u30bd\u30c3\u30c9\u306f <strong>ini<\/strong>\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u4ecb\u3057\u3066\u8a2d\u5b9a\u3092\u518d\u5ea6\u89e3\u6790\u3057\u3001\u8a2d\u5b9a\u3092\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5909\u6570\/\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u4fdd\u5b58\u3057\u307e\u3059\u3002\u305d\u306e\u5f8c\u306e\u30e1\u30bd\u30c3\u30c9\u547c\u3073\u51fa\u3057\u3067\u6b20\u9665\u8ffd\u8de1\u30b7\u30b9\u30c6\u30e0\u306e\u30a2\u30c9\u30ec\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u306b\u306f\u3001<strong>$this\u2192_address<\/strong> \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row _builder_version=&#8221;4.4.2&#8243;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.2&#8243;][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221;]<\/p>\n<h2>\u6b20\u9665\u3092\u691c\u7d22\u3059\u308b<\/h2>\n<p>\u307e\u305a\u3001\u6b20\u9665\u691c\u7d22\u6a5f\u80fd\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002\u3053\u306e\u6a5f\u80fd\u306f\u3001\u6b20\u9665\u30d7\u30c3\u30b7\u30e5\u6a5f\u80fd\u3088\u308a\u3082\u5b9f\u88c5\u304c\u7c21\u5358\u3067\u3042\u308b\u305f\u3081\u3001\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u3069\u306e\u3088\u3046\u306b\u6a5f\u80fd\u3059\u308b\u304b\u3092\u3088\u308a\u3088\u304f\u7406\u89e3\u3059\u308b\u306e\u306b\u9069\u3057\u3066\u3044\u308b\u304b\u3089\u3067\u3059\u3002TestRail \u304c\u5165\u529b\u3055\u308c\u305f\u6b20\u9665 ID \u3092 (\u305f\u3068\u3048\u3070\u30c6\u30b9\u30c8\u7d50\u679c\u306e\u4e00\u90e8\u3068\u3057\u3066) \u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3059\u308b\u3068\u304d\u3001\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u6b20\u9665\u306e\u691c\u7d22\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3057\u307e\u3059 (<strong>get_meta<\/strong> \u306b\u3088\u3063\u3066\u8fd4\u3055\u308c\u308b <strong>can_lookup<\/strong> \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066)\u3002<\/p>\n<p>\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u691c\u7d22\u6a5f\u80fd\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u30de\u30a6\u30b9 \u30ab\u30fc\u30bd\u30eb\u3092\u6b20\u9665 ID \u306e\u4e0a\u306b\u79fb\u52d5\u3059\u308b\u3068\u3001\u6b20\u9665\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u3068\u8aac\u660e\u306e\u8a73\u7d30\u3092\u53c2\u7167\u3067\u304d\u307e\u3059\u3002\u30e6\u30fc\u30b6\u30fc\u304c\u3053\u306e\u64cd\u4f5c\u3092\u5b9f\u884c\u3059\u308b\u305f\u3073\u306b\u3001\u30c7\u30fc\u30bf\u3092\u8868\u793a\u3059\u308b\u305f\u3081\u306b\u3001TestRail \u306f \u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u6b20\u9665\u306b\u95a2\u3059\u308b\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u3088\u3046\u306b\u8981\u6c42\u3057\u307e\u3059 (\u53c2\u8003\u307e\u3067\u306b\u3001\u4eca\u5f8c\u3001\u30ec\u30dd\u30fc\u30c8\u7528\u306b\u30aa\u30fc\u30d7\u30f3\u4e2d\/\u30af\u30ed\u30fc\u30ba\u6e08\u307f\u306e\u6b20\u9665\u3092\u8a08\u7b97\u3059\u308b\u306a\u3069\u3001\u4ed6\u306e\u76ee\u7684\u3067\u3053\u306e\u60c5\u5831\u304c\u4f7f\u7528\u3055\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059)\u3002<\/p>\n<p>\u6b20\u9665\u60c5\u5831\u306e\u8981\u6c42\u306f\u3001 <strong>lookup<\/strong> \u30e1\u30bd\u30c3\u30c9\u306b\u3088\u3063\u3066\u884c\u308f\u308c\u307e\u3059\u3002\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u547c\u3073\u51fa\u3055\u308c\u308b\u524d\u306b\u3001TestRail \u306f\u5e38\u306b <strong>configure<\/strong> \u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3057\u3066\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u5fc5\u8981\u306a\u8a2d\u5b9a\u304c\u3059\u3079\u3066\u5b58\u5728\u3059\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u67b6\u7a7a\u306e\u6b20\u9665\u8ffd\u8de1\u30b7\u30b9\u30c6\u30e0 <strong>Bugs<\/strong> \u306e <strong>lookup<\/strong> \u30e1\u30bd\u30c3\u30c9\u306f\u3001\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<p>[\/et_pb_text][et_pb_code _builder_version=&#8221;4.4.2&#8243;]<\/p>\n<pre class=\"language-php\"><code class=\"language-php\"><!-- [et_pb_line_break_holder] -->public function lookup($defect_id)<!-- [et_pb_line_break_holder] -->{<!-- [et_pb_line_break_holder] -->\t\/\/ Get the defect information via the Bugs API<!-- [et_pb_line_break_holder] -->\t$defect = $this-&gt;_bugs_get_defect($defect_id);<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->\t\/\/ Build the status_id based on the status property<!-- [et_pb_line_break_holder] -->\tif ($defect['status'] == 'Open')<!-- [et_pb_line_break_holder] -->\t{<!-- [et_pb_line_break_holder] -->\t\t$status_id = GI_DEFECTS_STATUS_OPEN;<!-- [et_pb_line_break_holder] -->\t}<!-- [et_pb_line_break_holder] -->\telseif ($defect['status'] == 'Resolved')<!-- [et_pb_line_break_holder] -->\t{<!-- [et_pb_line_break_holder] -->\t\t$status_id = GI_DEFECTS_STATUS_RESOLVED;<!-- [et_pb_line_break_holder] -->\t}<!-- [et_pb_line_break_holder] -->\telse<!-- [et_pb_line_break_holder] -->\t{<!-- [et_pb_line_break_holder] -->\t\t$status_id = GI_DEFECTS_STATUS_CLOSED;<!-- [et_pb_line_break_holder] -->\t}<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->\t\/\/ Build the bug URL and project link<!-- [et_pb_line_break_holder] -->\t$bug_url = str::format('{0}?bug={1}', <!-- [et_pb_line_break_holder] -->\t\t$this-&gt;_address,<!-- [et_pb_line_break_holder] -->\t\t$defect['id']);<!-- [et_pb_line_break_holder] -->\t$project_link = str::format(<!-- [et_pb_line_break_holder] -->\t\t'&lt;a target=\"_blank\" href=\"{0}project={1}\"&gt;{2}&lt;\/a&gt;',<!-- [et_pb_line_break_holder] -->\t\ta($this-&gt;_address),<!-- [et_pb_line_break_holder] -->\t\ta($defect['project_id']),<!-- [et_pb_line_break_holder] -->\t\th($defect['project']));<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->\t\/\/ Build the description<!-- [et_pb_line_break_holder] -->\t$description = str::format(<!-- [et_pb_line_break_holder] -->\t\t'&lt;div class=\"monospace\"&gt;{0}&lt;\/div&gt;<\/code><code class=\"language-php\">',<!-- [et_pb_line_break_holder] -->\t\tnl2br(<!-- [et_pb_line_break_holder] -->\t\t\thtml::link_urls(<!-- [et_pb_line_break_holder] -->\t\t\t\th($defect['description'])<!-- [et_pb_line_break_holder] -->\t\t\t)<!-- [et_pb_line_break_holder] -->\t\t)<!-- [et_pb_line_break_holder] -->\t);\t<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->\t\/\/ Return the defect details<!-- [et_pb_line_break_holder] -->\treturn array(<!-- [et_pb_line_break_holder] -->\t\t'id' =&gt; $defect['id'],<!-- [et_pb_line_break_holder] -->\t\t'title' =&gt; $defect['title'],<!-- [et_pb_line_break_holder] -->\t\t'status_id' =&gt; $status_id,<!-- [et_pb_line_break_holder] -->\t\t'status' =&gt; $defect['status'],<!-- [et_pb_line_break_holder] -->\t\t'url' =&gt; $bug_url,<!-- [et_pb_line_break_holder] -->\t\t'description' =&gt; $description,<!-- [et_pb_line_break_holder] -->\t\t'attributes' =&gt; array(<!-- [et_pb_line_break_holder] -->\t\t\t'Type' =&gt; h($defect['type']),<!-- [et_pb_line_break_holder] -->\t\t\t'Status' =&gt; h($defect['status']),<!-- [et_pb_line_break_holder] -->\t\t\t'Project' =&gt; $project_link<!-- [et_pb_line_break_holder] -->\t\t)<!-- [et_pb_line_break_holder] -->\t);<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><\/code><\/pre>\n<p>[\/et_pb_code][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221; hover_enabled=&#8221;0&#8243;]<\/p>\n<p>\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u3053\u308c\u307e\u3067\u898b\u3066\u304d\u305f\u4ed6\u306e\u30e1\u30bd\u30c3\u30c9\u5b9f\u88c5\u3088\u308a\u3082\u5c11\u3057\u9577\u3044\u306e\u3067\u3001\u30e1\u30bd\u30c3\u30c9\u304c\u5b9f\u884c\u3059\u308b\u30b9\u30c6\u30c3\u30d7\u3092\u500b\u5225\u306b\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u307e\u305a\u3001<strong>_bugs_get_defect<\/strong> internal\/private \u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3057\u3066\u3001\u6b20\u9665\u306e\u8a73\u7d30\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\u3053\u306e\u30e1\u30bd\u30c3\u30c9 (\u307e\u305f\u306f\u985e\u4f3c\u306e\u30e1\u30bd\u30c3\u30c9) \u306f\u901a\u5e38\u3001\u6b20\u9665\u8ffd\u8de1\u30b7\u30b9\u30c6\u30e0\u306e API \u3092\u547c\u3073\u51fa\u3059\u304b\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u6b20\u9665\u60c5\u5831\u3092\u691c\u7d22\u3057\u307e\u3059\u3002\u3053\u306e\u30b5\u30f3\u30d7\u30eb \u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30bd\u30fc\u30b9 \u30b3\u30fc\u30c9\u3092\u4ee5\u4e0b\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3068\u3001\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u5358\u306b\u3059\u3079\u3066\u306e\u6b20\u9665\u306e\u8a73\u7d30\u3092\u30cf\u30fc\u30c9\u30b3\u30fc\u30c9\u3057\u3066\u304a\u308a\u3001\u5b9f\u969b\u306b\u306f Web \u30b5\u30fc\u30d3\u30b9\u306e\u547c\u3073\u51fa\u3057\u3092\u884c\u3063\u3066\u3044\u306a\u3044\u3053\u3068\u306b\u6c17\u4ed8\u304f\u3067\u3057\u3087\u3046\u304c\u3001\u30c7\u30e2\u76ee\u7684\u3067\u306f\u3053\u308c\u3067\u3058\u3085\u3046\u3076\u3093\u3067\u3059\u3002<\/p>\n<p>\u305d\u306e\u5f8c\u3001TestRail \u306b\u8fd4\u3059 <strong>status_id<\/strong> \u3084\u30ea\u30f3\u30af\u3001\u8aac\u660e\u306a\u3069\u306e\u5024\u3092\u6e96\u5099\u3057\u307e\u3059\u3002<strong>status_id<\/strong>\u306f\u3001\u6b20\u9665\u304c open \u3067\u3042\u308b\u304b resolved \u3067\u3042\u308b\u304b\u3001\u307e\u305f\u306f closed \u3067\u3042\u308b\u304b\u3092 TestRail \u306b\u4f1d\u3048\u307e\u3059\u3002\u30d0\u30b0 \u30c8\u30e9\u30c3\u30ab\u30fc\u304c resolved \u3068 closed \u3092\u533a\u5225\u3057\u306a\u3044\u5834\u5408 (\u30d0\u30b0\u306f opened \u304b resolved \u306e\u3069\u3061\u3089\u304b\u3067\u3042\u308b\u5834\u5408\u306a\u3069)\u3001<strong>GI_DEFECTS_STATUS_CLOSED<\/strong> \u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002TestRail \u306f\u3001\u4eca\u5f8c\u3001\u30ec\u30dd\u30fc\u30c8\u304a\u3088\u3073\u305d\u306e\u4ed6\u306e\u6a5f\u80fd\u3067 status_id \u3092\u4f7f\u7528\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><strong>lookup<\/strong> \u30e1\u30bd\u30c3\u30c9\u304c\u8fd4\u3059\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u3044\u304f\u3064\u304b\u306f HTML \u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u3001TestRail \u306b\u8fd4\u3059\u524d\u306b\u6587\u5b57\u5217\u3084\u5024\u3092\u30a8\u30b9\u30b1\u30fc\u30d7\u3059\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3042\u308b\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059 (\u30d0\u30b0 \u30c8\u30e9\u30c3\u30ab\u30fc\u304c\u8fd4\u3059\u5024\u304c\u6709\u52b9\u306a HTML \u30c7\u30fc\u30bf\u3067\u306f\u306a\u3044\u5834\u5408)\u3002\u30a8\u30b9\u30b1\u30fc\u30d7\u3092\u884c\u308f\u306a\u3044\u3068\u3001\u30af\u30ed\u30b9 \u30b5\u30a4\u30c8 \u30b9\u30af\u30ea\u30d7\u30c6\u30a3\u30f3\u30b0 (XSS) \u653b\u6483\u306e\u5371\u967a\u6027\u304c\u3042\u308a\u3001\u6f5c\u5728\u7684\u306a\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3 \u30ea\u30b9\u30af\u3068\u306a\u308a\u307e\u3059\u3002\u6587\u5b57\u5217\u3092\u30a8\u30b9\u30b1\u30fc\u30d7\u3059\u308b\u306b\u306f\u3001TestRail \u304c\u63d0\u4f9b\u3059\u308b <strong>h()<\/strong> \u304a\u3088\u3073 <strong>a()<\/strong> \u30eb\u30fc\u30c1\u30f3\u3092\u4f7f\u7528\u3057\u3066\u3001\u305d\u308c\u305e\u308c\u30c6\u30ad\u30b9\u30c8\u3068\u30bf\u30b0\u5c5e\u6027\u3092\u30a8\u30b9\u30b1\u30fc\u30d7\u3057\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001\u8fd4\u3055\u308c\u308b\u5c5e\u6027\u306b HTML \u30b3\u30fc\u30c9 (\u30ea\u30f3\u30af\u306a\u3069) \u304c\u542b\u307e\u308c\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u540d\u306a\u3069\u306e\u5024\u3092\u30a8\u30b9\u30b1\u30fc\u30d7\u3057\u306a\u3044\u3068\u3001TestRail \u306f\u305d\u308c\u3089\u3092\u305d\u306e\u307e\u307e\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3059\u308b\u305f\u3081\u3001\u653b\u6483\u8005\u304c\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u540d\u3092\u4ecb\u3057\u3066 JavaScript \u30b3\u30fc\u30c9\u3092\u633f\u5165\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u30e1\u30bd\u30c3\u30c9\u304c <strong>div<\/strong> \u30bf\u30b0\u3067\u30d0\u30b0\u306e\u8aac\u660e\u3092\u30e9\u30c3\u30d7\u3057\u3001\u8aac\u660e\u3092\u7b49\u5e45\u30d5\u30a9\u30f3\u30c8\u3067\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3057\u3066\u3044\u308b\u3053\u3068\u306b\u3082\u6ce8\u76ee\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u6700\u5f8c\u306b\u91cd\u8981\u306a\u51e6\u7406\u3068\u3057\u3066\u3001\u30e1\u30bd\u30c3\u30c9\u306f TestRail \u306b\u6b20\u9665\u306e\u8a73\u7d30\u3092\u8fd4\u3057\u307e\u3059\u3002\u6b20\u9665 ID\u3001\u30bf\u30a4\u30c8\u30eb\u3001\u30b9\u30c6\u30fc\u30bf\u30b9\u306a\u3069\u306e\u60c5\u5831\u306e\u307b\u304b\u306b\u3001\u5c5e\u6027\u3068\u8aac\u660e\u3092\u8fd4\u3059\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002\u5c5e\u6027\u306b\u306f\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3001\u8ab2\u984c\u30bf\u30a4\u30d7\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3001\u307e\u305f\u306f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u9818\u57df\u306a\u3069\u306e\u60c5\u5831\u3092\u542b\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u5c5e\u6027\u3068\u540c\u3058\u3088\u3046\u306b\u3001\u8aac\u660e\u306f HTML \u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u305f\u3081\u3001\u3069\u3093\u306a\u7a2e\u985e\u306e\u60c5\u5831\u3092\u8ffd\u52a0\u3059\u308b\u306e\u306b\u3082\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002HTML \u30bf\u30b0\u304c\u58ca\u308c\u3066\u3044\u308b\u3068\u3001TestRail \u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u3084\u6a5f\u80fd\u304c\u58ca\u308c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u305f\u3081\u3001\u8fd4\u3055\u308c\u305f\u3059\u3079\u3066\u306e HTML \u306b\u542b\u307e\u308c\u308b\u30bf\u30b0\u3084\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u304c\u6709\u52b9\u3067\u3042\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u6b21\u306e\u30b9\u30af\u30ea\u30fc\u30f3 \u30b7\u30e7\u30c3\u30c8\u306f\u3001\u8fd4\u3055\u308c\u305f\u6b20\u9665\u306e\u60c5\u5831\u3092 TestRail \u304c\u3069\u306e\u3088\u3046\u306b\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3059\u308b\u304b\u3092\u793a\u3057\u3066\u3044\u307e\u3059 (\u8aac\u660e\u306e\u4e0a\u90e8\u306b\u9752\u3044\u80cc\u666f\u3067\u5c5e\u6027\u304c\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u306b\u6ce8\u76ee\u3057\u3066\u304f\u3060\u3055\u3044)\u3002<\/p>\n<p id=\"pushing_defects_without_dialog\">[\/et_pb_text][et_pb_image src=&#8221;\/testrail\/docs\/702\/wp-content\/uploads\/lookup-defects.png&#8221; _builder_version=&#8221;4.4.2&#8243;][\/et_pb_image][\/et_pb_column][\/et_pb_row][et_pb_row _builder_version=&#8221;4.4.2&#8243;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.2&#8243;][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221;]<\/p>\n<h2>\u30c0\u30a4\u30a2\u30ed\u30b0\u306a\u3057\u3067\u6b20\u9665\u3092\u30d7\u30c3\u30b7\u30e5\u3059\u308b<\/h2>\n<p>\u6b21\u306b\u3001TestRail \u304b\u3089\u6b20\u9665\u30ec\u30dd\u30fc\u30c8\u3092\u6b20\u9665\u8ffd\u8de1\u30c4\u30fc\u30eb\u306b\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u65b9\u6cd5\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u6700\u521d\u306b\u30d7\u30c3\u30b7\u30e5 \u30c0\u30a4\u30a2\u30ed\u30b0\u306a\u3057\u3067\u30d7\u30c3\u30b7\u30e5\u6a5f\u80fd\u3092\u5b9f\u88c5\u3057\u3001\u6b21\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u30d7\u30c3\u30b7\u30e5 \u30c0\u30a4\u30a2\u30ed\u30b0\u3092\u4f7f\u3063\u305f\u3088\u308a\u8907\u96d1\u306a\u30b7\u30ca\u30ea\u30aa\u3092\u898b\u3066\u3044\u304d\u307e\u3059\u3002\u30d7\u30c3\u30b7\u30e5 \u30c0\u30a4\u30a2\u30ed\u30b0\u306a\u3057\u3067\u30d7\u30c3\u30b7\u30e5\u6a5f\u80fd\u3092\u5b9f\u88c5\u3059\u308b\u5834\u5408\u30012 \u3064\u306e \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<strong>prepare_push<\/strong> \u3068 <strong>push<\/strong> \u3067\u3059\u3002TestRail \u306f <strong>prepare_push<\/strong> \u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3057\u3066\u3001\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u30c0\u30a4\u30a2\u30ed\u30b0\u304a\u3088\u3073\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u95a2\u3059\u308b\u60c5\u5831\u3092\u8981\u6c42\u3057\u307e\u3059\u3002\u30d7\u30c3\u30b7\u30e5 \u30c0\u30a4\u30a2\u30ed\u30b0\u3092\u5fc5\u8981\u3068\u305b\u305a\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u64cd\u4f5c\u306a\u3057\u3067\u30d0\u30b0 \u30ec\u30dd\u30fc\u30c8\u3092\u30d7\u30c3\u30b7\u30e5\u3057\u305f\u3044\u3060\u3051\u306e\u5834\u5408\u306f\u3001\u5358\u306b false \u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p>[\/et_pb_text][et_pb_code _builder_version=&#8221;4.4.2&#8243;]<\/p>\n<pre class=\"language-php\"><code class=\"language-php\"><!-- [et_pb_line_break_holder] -->public function prepare_push($context)<!-- [et_pb_line_break_holder] -->{<!-- [et_pb_line_break_holder] -->\treturn false;<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><\/code><\/pre>\n<p>[\/et_pb_code][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221;]<\/p>\n<p>\u5b9f\u969b\u306b\u6b20\u9665\u3092\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u305f\u3081\u306b\u3001<strong>push<\/strong> \u30e1\u30bd\u30c3\u30c9\u3082\u5b9f\u88c5\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u6709\u7528\u306a\u6b20\u9665\u30ec\u30dd\u30fc\u30c8\u3092\u4f5c\u6210\u3059\u308b\u306b\u306f\u3001\u3082\u3061\u308d\u3093\u30c6\u30b9\u30c8\u306b\u95a2\u3059\u308b\u60c5\u5831 (\u30b1\u30fc\u30b9\u306e\u30bf\u30a4\u30c8\u30eb\u3084\u5165\u529b\u3055\u308c\u305f\u30b3\u30e1\u30f3\u30c8\u306a\u3069) \u304c\u5fc5\u8981\u3067\u3059\u3057\u3001\u6b20\u9665\u3092\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u30e6\u30fc\u30b6\u30fc\u306a\u3069\u3001\u305d\u306e\u4ed6\u306e\u60c5\u5831\u304c\u5fc5\u8981\u306a\u5834\u5408\u3082\u3042\u308a\u307e\u3059\u3002\u305d\u3053\u3067\u3001\u30d7\u30c3\u30b7\u30e5\u95a2\u9023\u306e\u3059\u3079\u3066\u306e\u30e1\u30bd\u30c3\u30c9\u306b\u6e21\u3055\u308c\u308b <strong>$context<\/strong> \u5f15\u6570\u3092\u5229\u7528\u3059\u308b\u3068\u4fbf\u5229\u3067\u3059\u3002<strong>$context<\/strong>\u5f15\u6570\u306b\u306f\u3001\u30c6\u30b9\u30c8 \u30b1\u30fc\u30b9\u306b\u95a2\u3059\u308b\u8a73\u7d30\u3001\u30c6\u30b9\u30c8\u3001\u6b20\u9665\u3092\u30d7\u30c3\u30b7\u30e5\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308b\u30e6\u30fc\u30b6\u30fc\u306a\u3069\u3001\u591a\u304f\u306e\u6709\u7528\u306a\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u60c5\u5831\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002<strong>$context<\/strong> \u5f15\u6570\u3092\u4ecb\u3057\u3066\u6e21\u3055\u308c\u308b\u60c5\u5831\u3092\u3044\u304f\u3064\u304b\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>[\/et_pb_text][et_pb_code _builder_version=&#8221;4.4.2&#8243;]<code><\/code><\/p>\n<p><code><code><\/code><\/code><\/p>\n<pre><!-- [et_pb_line_break_holder] -->Array<!-- [et_pb_line_break_holder] -->(<!-- [et_pb_line_break_holder] -->    [event] =&gt; push<!-- [et_pb_line_break_holder] -->    [tests] =&gt; Array<!-- [et_pb_line_break_holder] -->        (<!-- [et_pb_line_break_holder] -->            [0] =&gt; stdClass Object<!-- [et_pb_line_break_holder] -->                (<!-- [et_pb_line_break_holder] -->                    [id] =&gt; 12<!-- [et_pb_line_break_holder] -->                    [run_id] =&gt; 1<!-- [et_pb_line_break_holder] -->                    [case_id] =&gt; 128<!-- [et_pb_line_break_holder] -->                    [status_id] =&gt; 1<!-- [et_pb_line_break_holder] -->                    [url] =&gt; http:\/\/testrail\/index.php?\/tests\/view\/12<!-- [et_pb_line_break_holder] -->                    [case] =&gt; stdClass Object<!-- [et_pb_line_break_holder] -->                        (<!-- [et_pb_line_break_holder] -->                            [id] =&gt; 128<!-- [et_pb_line_break_holder] -->                            [title] =&gt; Verify CSV import with enclosed test data files<!-- [et_pb_line_break_holder] -->                            [url] =&gt; http:\/\/testrail\/index.php?\/cases\/view\/128<!-- [et_pb_line_break_holder] -->                        )<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                    [run] =&gt; stdClass Object<!-- [et_pb_line_break_holder] -->                        (<!-- [et_pb_line_break_holder] -->                            [id] =&gt; 1<!-- [et_pb_line_break_holder] -->                            [name] =&gt; File Formats<!-- [et_pb_line_break_holder] -->                            [config] =&gt; <!-- [et_pb_line_break_holder] -->                            [plan_id] =&gt; <!-- [et_pb_line_break_holder] -->                            [project_id] =&gt; 1<!-- [et_pb_line_break_holder] -->                            [url] =&gt; http:\/\/testrail\/index.php?\/runs\/view\/1<!-- [et_pb_line_break_holder] -->                        )<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->                )<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->        )<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    [test_count] =&gt; 1<!-- [et_pb_line_break_holder] -->    [test_change] =&gt; stdClass Object<!-- [et_pb_line_break_holder] -->        (<!-- [et_pb_line_break_holder] -->            [status_id] =&gt; 1<!-- [et_pb_line_break_holder] -->            [assignedto] =&gt; <!-- [et_pb_line_break_holder] -->            [comment] =&gt; Importing our standard Unicode CSV file (unitest1.csv) failed with the error message `Could not detect file encoding`.<!-- [et_pb_line_break_holder] -->            [attachments] =&gt; <!-- [et_pb_line_break_holder] -->            [version] =&gt; <!-- [et_pb_line_break_holder] -->            [elapsed] =&gt; <!-- [et_pb_line_break_holder] -->            [defects] =&gt; <!-- [et_pb_line_break_holder] -->        )<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    [project] =&gt; stdClass Object<!-- [et_pb_line_break_holder] -->        (<!-- [et_pb_line_break_holder] -->            [id] =&gt; 1<!-- [et_pb_line_break_holder] -->            [name] =&gt; Datahub<!-- [et_pb_line_break_holder] -->            [url] =&gt; http:\/\/testrail\/index.php?\/projects\/overview\/1<!-- [et_pb_line_break_holder] -->        )<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    [preferences] =&gt; Array<!-- [et_pb_line_break_holder] -->        (<!-- [et_pb_line_break_holder] -->            [type] =&gt; 1<!-- [et_pb_line_break_holder] -->            [project] =&gt; DH<!-- [et_pb_line_break_holder] -->            [component] =&gt; 10010<!-- [et_pb_line_break_holder] -->        )<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->    [user] =&gt; stdClass Object<!-- [et_pb_line_break_holder] -->        (<!-- [et_pb_line_break_holder] -->            [id] =&gt; 2<!-- [et_pb_line_break_holder] -->            [name] =&gt; ..<!-- [et_pb_line_break_holder] -->            [email] =&gt; test@example.com<!-- [et_pb_line_break_holder] -->        )<!-- [et_pb_line_break_holder] --><!-- [et_pb_line_break_holder] -->)<!-- [et_pb_line_break_holder] --><\/pre>\n<p><code><\/code>[\/et_pb_code][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221;]<\/p>\n<p>\u3054\u89a7\u306e\u3068\u304a\u308a\u3001TestRail \u306f\u9078\u629e\u3057\u305f\u30c6\u30b9\u30c8\u3001\u95a2\u9023\u3059\u308b\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3001\u30c6\u30b9\u30c8\u306e\u5909\u66f4 (\u30e6\u30fc\u30b6\u30fc\u304c <strong>[\u7d50\u679c\u306e\u8ffd\u52a0]<\/strong> \u30c0\u30a4\u30a2\u30ed\u30b0\u3067\u5165\u529b\u3057\u305f\u60c5\u5831) \u306a\u3069\u306b\u95a2\u3059\u308b\u8a73\u7d30\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002\u30c7\u30fc\u30bf\u69cb\u9020\u304b\u3089\u308f\u304b\u308b\u3088\u3046\u306b\u3001TestRail \u304c\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u8907\u6570\u306e\u30c6\u30b9\u30c8\u3092\u6e21\u3059\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u30e6\u30fc\u30b6\u30fc\u304c\u8907\u6570\u306e\u30c6\u30b9\u30c8\u3092\u9078\u629e\u3057\u3001<strong>[\u7d50\u679c\u306e\u8ffd\u52a0]<\/strong> \u30dc\u30bf\u30f3\u3092\u4f7f\u7528\u3057\u3066\u305d\u308c\u3089\u306e\u3059\u3079\u3066\u306e\u30c6\u30b9\u30c8\u306b\u4e00\u5ea6\u306b\u7d50\u679c\u3092\u8ffd\u52a0\u3057\u305f\u5834\u5408\u3001TestRail \u306f\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u8907\u6570\u306e\u30c6\u30b9\u30c8 \u30ec\u30b3\u30fc\u30c9\u3092\u6e21\u3057\u307e\u3059\u3002\u6b20\u9665\u3092\u30d7\u30c3\u30b7\u30e5\u3057\u3066\u65b0\u3057\u3044\u6b20\u9665 ID \u3092\u8fd4\u3059\u51e6\u7406\u306f\u3001\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>[\/et_pb_text][et_pb_code _builder_version=&#8221;4.4.2&#8243;]<\/p>\n<pre class=\"language-php\"><code class=\"language-php\"><!-- [et_pb_line_break_holder] -->public function push($context, $input)<!-- [et_pb_line_break_holder] -->{<!-- [et_pb_line_break_holder] -->\t\/\/ Build the summary\/title<!-- [et_pb_line_break_holder] -->\t$test = current($context['tests']);<!-- [et_pb_line_break_holder] -->\t$summary = 'Failed test: ' . $test-&gt;case-&gt;title;<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->\tif ($context['test_count'] &gt; 1)<!-- [et_pb_line_break_holder] -->\t{<!-- [et_pb_line_break_holder] -->\t\t$summary .= ' (+others)';<!-- [et_pb_line_break_holder] -->\t}\t<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->\t\/\/ Build the comment (based on the test result comment<!-- [et_pb_line_break_holder] -->\t\/\/ and links\/URLs of the tests<!-- [et_pb_line_break_holder] -->\tif ($context['test_change']-&gt;comment)<!-- [et_pb_line_break_holder] -->\t{<!-- [et_pb_line_break_holder] -->\t\t$comment = $context['test_change']-&gt;comment;<!-- [et_pb_line_break_holder] -->\t\t$comment .= \"\\n\";<!-- [et_pb_line_break_holder] -->\t}<!-- [et_pb_line_break_holder] -->\telse <!-- [et_pb_line_break_holder] -->\t{<!-- [et_pb_line_break_holder] -->\t\t$comment = '';<!-- [et_pb_line_break_holder] -->\t}<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->\t$tests = $context['tests'];<!-- [et_pb_line_break_holder] -->\tforeach ($tests as $test)<!-- [et_pb_line_break_holder] -->\t{<!-- [et_pb_line_break_holder] -->\t\t$comment .= \"\\nTest: \";<!-- [et_pb_line_break_holder] -->\t\t$comment .= $test-&gt;case-&gt;title;<!-- [et_pb_line_break_holder] -->\t\t$comment .= \"\\n\";<!-- [et_pb_line_break_holder] -->\t\t$comment .= $test-&gt;url;<!-- [et_pb_line_break_holder] -->\t}<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->\t\/\/ We hard code a few other details here for demonstration<!-- [et_pb_line_break_holder] -->\t\/\/ purposes. We could also select these attributes based<!-- [et_pb_line_break_holder] -->\t\/\/ on context information such as the test suite or user<!-- [et_pb_line_break_holder] -->\t$project = $context['project']-&gt;name;<!-- [et_pb_line_break_holder] -->\t$type = 'Bug';<!-- [et_pb_line_break_holder] -->\t$component = '(default)';<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->\t\/\/ Push the defect and return the new defect ID<!-- [et_pb_line_break_holder] -->\t$defect_id = $this-&gt;_bugs_push_defect(<!-- [et_pb_line_break_holder] -->\t\t$summary,<!-- [et_pb_line_break_holder] -->\t\t$comment,<!-- [et_pb_line_break_holder] -->\t\t$project,<!-- [et_pb_line_break_holder] -->\t\t$type,<!-- [et_pb_line_break_holder] -->\t\t$component<!-- [et_pb_line_break_holder] -->\t);<!-- [et_pb_line_break_holder] -->\treturn $defect_id;<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><\/code><\/pre>\n<p>[\/et_pb_code][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221; hover_enabled=&#8221;0&#8243;]<\/p>\n<p><strong>push<\/strong> \u30e1\u30bd\u30c3\u30c9\u306f\u3001\u5165\u529b\u3055\u308c\u305f\u30c6\u30b9\u30c8\u7d50\u679c\u3068\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u60c5\u5831\u306b\u57fa\u3065\u3044\u3066\u30d0\u30b0 \u30ec\u30dd\u30fc\u30c8\u306e\u30bf\u30a4\u30c8\u30eb\/\u8981\u7d04\u3068\u30b3\u30e1\u30f3\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u305d\u306e\u5f8c\u3001\u5185\u90e8\u306e <strong>_bugs_push_defect<\/strong> \u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3057\u3066\u3001\u5b9f\u969b\u306e\u30d0\u30b0 \u30ec\u30dd\u30fc\u30c8\u3092\u9001\u4fe1\u3057\u307e\u3059\u3002\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u3001Web \u30b5\u30fc\u30d3\u30b9 API \u306e\u547c\u3073\u51fa\u3057\u307e\u305f\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3078\u306e\u30d0\u30b0 \u30ec\u30dd\u30fc\u30c8\u306e\u66f8\u304d\u8fbc\u307f\u3092\u5b9f\u88c5\u3057\u307e\u3059\u3002\u65b0\u3057\u3044\u6b20\u9665\u306e ID \u3092TestRail \u306b\u8fd4\u3059\u3068\u3001TestRail \u304c\u81ea\u52d5\u7684\u306b <strong>[\u6b20\u9665]<\/strong> \u30d5\u30a3\u30fc\u30eb\u30c9\u306b ID \u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row _builder_version=&#8221;4.4.2&#8243;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.2&#8243;][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221;]<\/p>\n<h2>\u30c0\u30a4\u30a2\u30ed\u30b0\u3092\u4f7f\u7528\u3057\u3066\u6b20\u9665\u3092\u30d7\u30c3\u30b7\u30e5\u3059\u308b<\/h2>\n<p>\u30e6\u30fc\u30b6\u30fc\u306e\u64cd\u4f5c\u306a\u3057\u3067\u30d0\u30b0 \u30ec\u30dd\u30fc\u30c8\u3092\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u69cb\u7bc9\u3092\u898b\u3066\u304d\u305f\u306e\u3067\u3001\u6b21\u306b <strong>[\u6b20\u9665\u306e\u30d7\u30c3\u30b7\u30e5]<\/strong> \u30c0\u30a4\u30a2\u30ed\u30b0\u3092\u4f7f\u7528\u3059\u308b\u3088\u3046\u306b\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u66f4\u65b0\u3057\u307e\u3059\u3002\u30c6\u30b9\u30bf\u30fc\u306f\u3001\u6b20\u9665\u3092\u6b20\u9665\u8ffd\u8de1\u30b7\u30b9\u30c6\u30e0\u306b\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u969b\u3001\u3053\u306e\u30c0\u30a4\u30a2\u30ed\u30b0\u3092\u4f7f\u7528\u3057\u3066\u6b20\u9665\u306e\u8aac\u660e\u3092\u5909\u66f4\u3057\u305f\u308a\u3001\u5225\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u9078\u629e\u3057\u305f\u308a\u3067\u304d\u307e\u3059\u3002\u6700\u521d\u306b <strong>prepare_push<\/strong> \u30e1\u30bd\u30c3\u30c9\u3092\u5909\u66f4\u3057\u307e\u3059\u3002\u30c0\u30a4\u30a2\u30ed\u30b0\u304c\u4e0d\u8981\u3067\u3042\u308b\u3053\u3068\u3092\u793a\u3059 <strong>false<\/strong>\u3092\u8fd4\u3059\u4ee3\u308f\u308a\u306b\u3001\u6b21\u306e\u3088\u3046\u306a\u30d5\u30a9\u30fc\u30e0 \u30b9\u30ad\u30fc\u30de\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p>[\/et_pb_text][et_pb_code _builder_version=&#8221;4.4.2&#8243;]<\/p>\n<pre class=\"language-php\"><code class=\"language-php\"><!-- [et_pb_line_break_holder] -->public function prepare_push($context)<!-- [et_pb_line_break_holder] -->{<!-- [et_pb_line_break_holder] -->\t\/\/ Return a form with the following fields\/properties<!-- [et_pb_line_break_holder] -->\treturn array(<!-- [et_pb_line_break_holder] -->\t\t'fields' =&gt; array(<!-- [et_pb_line_break_holder] -->\t\t\t'summary' =&gt; array(<!-- [et_pb_line_break_holder] -->\t\t\t\t'type' =&gt; 'string',<!-- [et_pb_line_break_holder] -->\t\t\t\t'label' =&gt; 'Summary',<!-- [et_pb_line_break_holder] -->\t\t\t\t'required' =&gt; true,<!-- [et_pb_line_break_holder] -->\t\t\t\t'size' =&gt; 'full'<!-- [et_pb_line_break_holder] -->\t\t\t),<!-- [et_pb_line_break_holder] -->\t\t\t'type' =&gt; array(<!-- [et_pb_line_break_holder] -->\t\t\t\t'type' =&gt; 'dropdown',<!-- [et_pb_line_break_holder] -->\t\t\t\t'label' =&gt; 'Issue Type',<!-- [et_pb_line_break_holder] -->\t\t\t\t'required' =&gt; true,<!-- [et_pb_line_break_holder] -->\t\t\t\t'remember' =&gt; true,<!-- [et_pb_line_break_holder] -->\t\t\t\t'size' =&gt; 'compact'<!-- [et_pb_line_break_holder] -->\t\t\t),<!-- [et_pb_line_break_holder] -->\t\t\t'project' =&gt; array(<!-- [et_pb_line_break_holder] -->\t\t\t\t'type' =&gt; 'dropdown',<!-- [et_pb_line_break_holder] -->\t\t\t\t'label' =&gt; 'Project',<!-- [et_pb_line_break_holder] -->\t\t\t\t'required' =&gt; true,<!-- [et_pb_line_break_holder] -->\t\t\t\t'remember' =&gt; true,<!-- [et_pb_line_break_holder] -->\t\t\t\t'cascading' =&gt; true,<!-- [et_pb_line_break_holder] -->\t\t\t\t'size' =&gt; 'compact'<!-- [et_pb_line_break_holder] -->\t\t\t),<!-- [et_pb_line_break_holder] -->\t\t\t'component' =&gt; array(<!-- [et_pb_line_break_holder] -->\t\t\t\t'type' =&gt; 'dropdown',<!-- [et_pb_line_break_holder] -->\t\t\t\t'label' =&gt; 'Component',<!-- [et_pb_line_break_holder] -->\t\t\t\t'required' =&gt; true,<!-- [et_pb_line_break_holder] -->\t\t\t\t'remember' =&gt; true,<!-- [et_pb_line_break_holder] -->\t\t\t\t'depends_on' =&gt; 'project',<!-- [et_pb_line_break_holder] -->\t\t\t\t'size' =&gt; 'compact'<!-- [et_pb_line_break_holder] -->\t\t\t),<!-- [et_pb_line_break_holder] -->\t\t\t'description' =&gt; array(<!-- [et_pb_line_break_holder] -->\t\t\t\t'type' =&gt; 'text',<!-- [et_pb_line_break_holder] -->\t\t\t\t'label' =&gt; 'Description'<!-- [et_pb_line_break_holder] -->\t\t\t)<!-- [et_pb_line_break_holder] -->\t\t)<!-- [et_pb_line_break_holder] -->\t);<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><\/code><\/pre>\n<p>[\/et_pb_code][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221;]<\/p>\n<p>\u30d5\u30a9\u30fc\u30e0 \u30b9\u30ad\u30fc\u30de\u306f\u3001\u5fc5\u8981\u306a\u30d5\u30a9\u30fc\u30e0 \u30d5\u30a3\u30fc\u30eb\u30c9\u3092 TestRail \u306b\u6307\u793a\u3057\u307e\u3059\u3002<strong>prepare_push<\/strong> \u30e1\u30bd\u30c3\u30c9\u3067\u8fd4\u3057\u305f\u30d5\u30a9\u30fc\u30e0 \u30b9\u30ad\u30fc\u30de\u306b\u57fa\u3065\u3044\u3066 TestRail \u304c\u81ea\u52d5\u7684\u306b\u30d7\u30c3\u30b7\u30e5 \u30c0\u30a4\u30a2\u30ed\u30b0\u3092\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3059\u308b\u305f\u3081\u3001\u6b20\u9665\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u30c0\u30a4\u30a2\u30ed\u30b0\u81ea\u4f53\u3092\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u4e0a\u8a18\u306e\u4f8b\u3067\u8fd4\u3055\u308c\u308b\u30d5\u30a9\u30fc\u30e0 \u30b9\u30ad\u30fc\u30de\u306e\u5927\u90e8\u5206\u306f\u3001\u8aac\u660e\u304c\u306a\u304f\u3068\u3082\u308f\u304b\u308b\u3067\u3057\u3087\u3046\u3002TestRail \u304c\u8868\u793a\u3059\u308b\u30d5\u30a9\u30fc\u30e0 \u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u30ea\u30b9\u30c8\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p>\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u914d\u5217\u30ad\u30fc (\u4f8b\u3048\u3070 &#8216;description&#8217;) \u306f\u3001TestRail \u304c\u5165\u529b\u30c7\u30fc\u30bf\u3092\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u6e21\u3059\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b\u540d\u524d\u3067\u3059\u3002\u30d5\u30a3\u30fc\u30eb\u30c9\u306e type \u306f\u3001\u73fe\u5728\u3001<strong>text<\/strong>\u3001<strong>dropdown<\/strong> \u307e\u305f\u306f <strong>string<\/strong> \u306e\u3044\u305a\u308c\u304b\u3067\u3001\u5fc5\u8981\u306a\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u30bf\u30a4\u30d7\u3092 TestRail\u306b\u4f1d\u3048\u307e\u3059\u3002<strong>string<\/strong> \u306f\u5358\u4e00\u884c\u306e\u30c6\u30ad\u30b9\u30c8\u5165\u529b\u8981\u7d20\u3067\u3042\u308a\u3001<strong>text<\/strong> \u306f\u8907\u6570\u306e\u5165\u529b\u884c\u3092\u53d7\u3051\u5165\u308c\u307e\u3059 \u3002<strong>required<\/strong> \u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u306b\u3088\u308b\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u5165\u529b\u304c\u5fc5\u9808\u304b\u307e\u305f\u306f\u4efb\u610f\u304b\u3092\u6307\u5b9a\u3057\u3001 <strong>label<\/strong> \u306f\u30c0\u30a4\u30a2\u30ed\u30b0\u5185\u3067\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u8868\u793a\u65b9\u6cd5\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p><strong>size<\/strong> \u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u3001\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u6a2a\u5e45\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<strong>full<\/strong> \u304c\u6307\u5b9a\u3055\u308c\u305f\u5834\u5408\u3001\u30d5\u30a3\u30fc\u30eb\u30c9\u306f\u30c0\u30a4\u30a2\u30ed\u30b0\u306e\u6a2a\u5e45\u3044\u3063\u3071\u3044\u306e\u5927\u304d\u3055\u306b\u306a\u308a\u307e\u3059\u3002\u30d5\u30a3\u30fc\u30eb\u30c9 \u30b5\u30a4\u30ba\u3068\u3057\u3066 <strong>compact<\/strong> \u3092\u6307\u5b9a\u3059\u308b\u3068\u3001TestRail \u306f\u540c\u3058\u884c\u306b\u8907\u6570\u306e\u5c0f\u3055\u306a\u30d5\u30a3\u30fc\u30eb\u30c9\u3092\u8868\u793a\u3057\u3088\u3046\u3068\u3057\u307e\u3059 (\u3053\u308c\u306f\u3001\u30d5\u30a9\u30fc\u30e0 \u30b9\u30ad\u30fc\u30de\u3067\u3072\u3068\u307e\u3068\u307e\u308a\u3067\u6307\u5b9a\u3055\u308c\u305f\u5c0f\u3055\u306a\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u306e\u307f\u9069\u7528\u3055\u308c\u307e\u3059)\u3002<strong>remember<\/strong> \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u305f\u5834\u5408\u3001TestRail \u306f\u73fe\u5728\u306e TestRail \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u6700\u5f8c\u306b\u5165\u529b\u3055\u308c\u305f\u5024\u3092\u4fdd\u5b58\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u4ee5\u524d\u306b\u5165\u529b\u3057\u305f\u30d5\u30a9\u30fc\u30e0\u5024 (\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u9818\u57df\u3084\u30b5\u30d6 \u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306a\u3069) \u3092\u7c21\u5358\u306b\u4fdd\u5b58\u3067\u304d\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u540c\u3058\u30c7\u30fc\u30bf\u3092\u4f55\u5ea6\u3082\u5165\u529b\u3059\u308b\u5fc5\u8981\u304c\u306a\u304f\u306a\u308a\u307e\u3059\u3002\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u306e\u5f8c\u534a\u3067\u3001\u3053\u308c\u304c\u3069\u306e\u3088\u3046\u306b\u6a5f\u80fd\u3059\u308b\u306e\u304b\u3092\u898b\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u30d5\u30a3\u30fc\u30eb\u30c9\u304c\u4ed6\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u4f9d\u5b58\u3059\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001<strong>[\u30d7\u30ed\u30b8\u30a7\u30af\u30c8]<\/strong> \u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3 \u30d5\u30a3\u30fc\u30eb\u30c9\u304c\u3042\u308b\u5834\u5408\u3001\u95a2\u9023\u3059\u308b <strong>[\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u9818\u57df]<\/strong> \u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u5024\u306f\u3001\u9078\u629e\u3057\u305f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u3088\u3063\u3066\u7570\u306a\u308a\u307e\u3059\u3002TestRail \u306f\u3001\u3053\u306e\u3088\u3046\u306a\u30b1\u30fc\u30b9\u306b\u5bfe\u5fdc\u3059\u308b\u305f\u3081\u306b\u3001\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002\u30e6\u30fc\u30b6\u30fc\u304c\u5225\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u9078\u629e\u3057\u305f\u5834\u5408\u3001TestRail \u306f\u65b0\u3057\u304f\u9078\u629e\u3057\u305f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u6709\u52b9\u306a\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u9818\u57df\u3092\u6b20\u9665\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u8981\u6c42\u3057\u3001[\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u9818\u57df] \u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u5024\u3092\u30af\u30ea\u30a2\u3057\u307e\u3059\u3002\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u4f9d\u5b58\u95a2\u4fc2\u306f <strong>depends_on<\/strong> \u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u3088\u3063\u3066\u6307\u5b9a\u3055\u308c\u3001\u73fe\u5728\u306f\u3001\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3 \u30d5\u30a3\u30fc\u30eb\u30c9\u3067\u306e\u307f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u4ed6\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u304c\u4f9d\u5b58\u3067\u304d\u308b\u30d5\u30a3\u30fc\u30eb\u30c9\u3092 <strong>cascading<\/strong> \u3068\u3057\u3066\u30de\u30fc\u30af\u3059\u308b (\u305d\u308c\u305e\u308c\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u3088\u3063\u3066) \u3053\u3068\u3082\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p>\u30d5\u30a9\u30fc\u30e0 \u30b9\u30ad\u30fc\u30de\u3092\u6307\u5b9a\u3057\u305f\u306e\u3067\u3001\u4eca\u5ea6\u306f\u6709\u52b9\u306a\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u5024\u3068\u30c0\u30a4\u30a2\u30ed\u30b0 \u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u30c7\u30d5\u30a9\u30eb\u30c8 \u30c6\u30ad\u30b9\u30c8\u3092 TestRail \u306b\u6307\u793a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306f <strong>prepare_field<\/strong> \u30e1\u30bd\u30c3\u30c9\u3092\u4ecb\u3057\u3066\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002TestRail \u304c\u30c0\u30a4\u30a2\u30ed\u30b0\u3092\u521d\u671f\u5316\u3059\u308b\u3068\u304d\u3001\u307e\u305f\u306f\u30ab\u30b9\u30b1\u30fc\u30c9 \u30d5\u30a3\u30fc\u30eb\u30c9\u304c\u5909\u66f4\u3055\u308c\u305f\u3068\u304d\u3001TestRail \u306f\u95a2\u9023\u3059\u308b\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u95a2\u3059\u308b\u60c5\u5831\u3092\u63d0\u4f9b\u3059\u308b\u3088\u3046\u306b\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u4f9d\u983c\u3057\u307e\u3059\u3002TestRail\u306f\u3001\u60c5\u5831\u3092\u5fc5\u8981\u3068\u3059\u308b\u3059\u3079\u3066\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u5bfe\u3057\u3066 <strong>prepare_field<\/strong> \u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3057\u307e\u3059\u3002<\/p>\n<p>[\/et_pb_text][et_pb_code _builder_version=&#8221;4.4.2&#8243;]<\/p>\n<pre class=\"language-php\"><code class=\"language-php\"><!-- [et_pb_line_break_holder] -->public function prepare_field($context, $input, $field)<!-- [et_pb_line_break_holder] -->{<!-- [et_pb_line_break_holder] -->\t$data = array();<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->\t\/\/ Take the preferences of the user into account, but only<!-- [et_pb_line_break_holder] -->\t\/\/ for the initial form rendering (not for cascading loads).<!-- [et_pb_line_break_holder] -->\tif ($context['event'] == 'prepare')<!-- [et_pb_line_break_holder] -->\t{<!-- [et_pb_line_break_holder] -->\t\t$prefs = arr::get($context, 'preferences');<!-- [et_pb_line_break_holder] -->\t}<!-- [et_pb_line_break_holder] -->\telse<!-- [et_pb_line_break_holder] -->\t{<!-- [et_pb_line_break_holder] -->\t\t$prefs = null;<!-- [et_pb_line_break_holder] -->\t}<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->\t\/\/ And then build the options and default values for the<!-- [et_pb_line_break_holder] -->\t\/\/ form fields and return them.<!-- [et_pb_line_break_holder] -->\tswitch ($field)<!-- [et_pb_line_break_holder] -->\t{<!-- [et_pb_line_break_holder] -->\t\tcase 'summary':<!-- [et_pb_line_break_holder] -->\t\t\t$data['default'] = <!-- [et_pb_line_break_holder] -->\t\t\t\t$this-&gt;_get_summary_default($context);<!-- [et_pb_line_break_holder] -->\t\t\tbreak;<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->\t\tcase 'description':<!-- [et_pb_line_break_holder] -->\t\t\t$data['default'] = <!-- [et_pb_line_break_holder] -->\t\t\t\t$this-&gt;_get_description_default($context);<!-- [et_pb_line_break_holder] -->\t\t\tbreak;<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->\t\tcase 'type':<!-- [et_pb_line_break_holder] -->\t\t\t$data['options'] = $this-&gt;_bugs_get_types();<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->\t\t\t\/\/ Select the stored preference or the first item in<!-- [et_pb_line_break_holder] -->\t\t\t\/\/ the list otherwise.<!-- [et_pb_line_break_holder] -->\t\t\t$default = arr::get($prefs, 'type');<!-- [et_pb_line_break_holder] -->\t\t\tif ($default)<!-- [et_pb_line_break_holder] -->\t\t\t{<!-- [et_pb_line_break_holder] -->\t\t\t\t$data['default'] = $default;<!-- [et_pb_line_break_holder] -->\t\t\t}<!-- [et_pb_line_break_holder] -->\t\t\telse<!-- [et_pb_line_break_holder] -->\t\t\t{<!-- [et_pb_line_break_holder] -->\t\t\t\tif ($data['options'])<!-- [et_pb_line_break_holder] -->\t\t\t\t{<!-- [et_pb_line_break_holder] -->\t\t\t\t\t$data['default'] = key($data['options']);<!-- [et_pb_line_break_holder] -->\t\t\t\t}<!-- [et_pb_line_break_holder] -->\t\t\t}\t\t\t\t<!-- [et_pb_line_break_holder] -->\t\t\tbreak;<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->\t\tcase 'project':<!-- [et_pb_line_break_holder] -->\t\t\t$data['default'] = arr::get($prefs, 'project');<!-- [et_pb_line_break_holder] -->\t\t\t$data['options'] = $this-&gt;_bugs_get_projects();<!-- [et_pb_line_break_holder] -->\t\t\tbreak;<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->\t\tcase 'component':<!-- [et_pb_line_break_holder] -->\t\t\tif (isset($input['project']))<!-- [et_pb_line_break_holder] -->\t\t\t{<!-- [et_pb_line_break_holder] -->\t\t\t\t$data['default'] = arr::get($prefs, 'component');<!-- [et_pb_line_break_holder] -->\t\t\t\t$data['options'] = $this-&gt;_bugs_get_components(<!-- [et_pb_line_break_holder] -->\t\t\t\t\t$input['project']);<!-- [et_pb_line_break_holder] -->\t\t\t}<!-- [et_pb_line_break_holder] -->\t\t\tbreak;<!-- [et_pb_line_break_holder] -->\t}<!-- [et_pb_line_break_holder] --> <!-- [et_pb_line_break_holder] -->\treturn $data;<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><\/code><\/pre>\n<p>[\/et_pb_code][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221;]<\/p>\n<p>TestRail \u306f <strong>prepare_field<\/strong> \u30e1\u30bd\u30c3\u30c9\u306b 3 \u3064\u306e\u5f15\u6570\u3092\u6e21\u3057\u307e\u3059\u3002<strong>$context<\/strong> \u5f15\u6570\u306b\u306f\u3001\u524d\u306e\u30e1\u30bd\u30c3\u30c9\u304b\u3089\u5f15\u304d\u7d99\u3044\u3060\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u60c5\u5831\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002<strong>$input<\/strong> \u914d\u5217\u306b\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u30d7\u30c3\u30b7\u30e5 \u30c0\u30a4\u30a2\u30ed\u30b0\u306b\u5165\u529b\u3057\u305f\u5b9f\u969b\u306e\u30c7\u30fc\u30bf\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059 (\u3053\u308c\u306f\u30ab\u30b9\u30b1\u30fc\u30c9 \u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u306e\u547c\u3073\u51fa\u3057\u6642\u306b\u7279\u306b\u5f79\u7acb\u3061\u307e\u3059)\u3002<strong>$field<\/strong> \u5f15\u6570\u306b\u306f\u3001\u30e1\u30bd\u30c3\u30c9\u304c\u547c\u3073\u51fa\u3055\u308c\u305f\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u540d\u524d\u304c\u542b\u307e\u308c\u307e\u3059 (\u30e1\u30bd\u30c3\u30c9\u306f\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u5bfe\u3057\u3066\u500b\u5225\u306b\u547c\u3073\u51fa\u3055\u308c\u307e\u3059)\u3002<\/p>\n<p>TestRail \u306f <strong>$context<\/strong> \u5f15\u6570\u306e\u4e00\u90e8\u3068\u3057\u3066 (\u73fe\u5728\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u5bfe\u3059\u308b) \u73fe\u5728\u306e\u30e6\u30fc\u30b6\u30fc\u306e\u8a2d\u5b9a\u3082\u6e21\u3057\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001TestRail \u304c\u73fe\u5728\u30c0\u30a4\u30a2\u30ed\u30b0\u3092\u521d\u671f\u5316\u3057\u3066\u3044\u308b\u5834\u5408\u3001<strong>prepare_field<\/strong> \u30e1\u30bd\u30c3\u30c9\u304c\u6700\u521d\u306b\u884c\u3046\u51e6\u7406\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u8a2d\u5b9a\u3092\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u306b\u30b3\u30d4\u30fc\u3059\u308b\u3053\u3068\u3067\u3059\u3002\u3059\u3067\u306b\u521d\u671f\u5316\u3055\u308c\u305f\u5f8c\u3001\u30ab\u30b9\u30b1\u30fc\u30c9 \u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3 \u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u5bfe\u3059\u308b\u547c\u3073\u51fa\u3057\u3067\u3042\u308b\u5834\u5408\u306f\u3001\u8a2d\u5b9a\u3092\u7121\u8996\u3057\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u5f8c\u3001TestRail \u306b\u30d5\u30a3\u30fc\u30eb\u30c9\u7528\u306e\u9069\u5207\u306a\u30c7\u30fc\u30bf\u3092\u8fd4\u3057\u307e\u3059\u3002\u3053\u306e\u4f8b\u3067\u306f\u3001\u9577\u3044 switch \u6587\u3067\u3053\u306e\u51e6\u7406\u3092\u884c\u3044\u307e\u3059\u3002TestRail \u304c\u30c7\u30fc\u30bf\u3092\u8981\u6c42\u3057\u3066\u3044\u308b\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u5fdc\u3058\u3066\u3001\u95a2\u9023\u3059\u308b\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<p>\u305f\u3068\u3048\u3070\u3001TestRail \u304c Project \u30d5\u30a3\u30fc\u30eb\u30c9\u7528\u306e\u5024\u3092\u8981\u6c42\u3057\u305f\u5834\u5408\u3001\u6b21\u306e\u30b3\u30fc\u30c9\u304c\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>[\/et_pb_text][et_pb_code _builder_version=&#8221;4.4.2&#8243;]<\/p>\n<pre class=\"language-php\"><code class=\"language-php\"><!-- [et_pb_line_break_holder] -->case 'project':<!-- [et_pb_line_break_holder] -->\t$data['default'] = arr::get($prefs, 'project');<!-- [et_pb_line_break_holder] -->\t$data['options'] = $this-&gt;_bugs_get_projects();<!-- [et_pb_line_break_holder] -->\tbreak;<!-- [et_pb_line_break_holder] --><\/code><\/pre>\n<p>[\/et_pb_code][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221;]<\/p>\n<p>\u57fa\u672c\u7684\u306b\u3001TestRail \u306f\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3 \u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u95a2\u3057\u3066 2 \u3064\u306e\u60c5\u5831\u3092\u5fc5\u8981\u3068\u3057\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u9078\u629e\u53ef\u80fd\u306a <strong>options<\/strong> \u3068\u9078\u629e\u3055\u308c\u3066\u3044\u308b <strong>default<\/strong> \u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3059\u3002\u30c6\u30ad\u30b9\u30c8 \u30d5\u30a3\u30fc\u30eb\u30c9\u304a\u3088\u3073\u6587\u5b57\u5217\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u306f\u3001<strong>default<\/strong> \u5024\u3060\u3051\u3092\u6307\u5b9a\u3057\u307e\u3059 (\u30c6\u30ad\u30b9\u30c8 \u30d5\u30a3\u30fc\u30eb\u30c9\u307e\u305f\u306f\u6587\u5b57\u5217\u30d5\u30a3\u30fc\u30eb\u30c9\u306b\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u9078\u629e\u53ef\u80fd\u306a\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u306a\u3044\u304b\u3089\u3067\u3059)\u3002\u3053\u306e\u4f8b\u3067\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u8a2d\u5b9a\u306b\u57fa\u3065\u3044\u3066 <strong>default<\/strong> \u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u9078\u629e\u3055\u308c\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u4ee5\u524d\u306b\u7279\u5b9a\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u9078\u629e\u3057\u305f\u5834\u5408\u306f\u3001\u305d\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u5fa9\u5143\u3057\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u518d\u5ea6\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\u3088\u3046\u306b\u3057\u307e\u3059\u3002\u540c\u69d8\u306b\u3001\u30c6\u30b9\u30c8\u306e\u8a73\u7d30\u306b\u57fa\u3065\u3044\u3066\u3001\u8981\u7d04\/\u30bf\u30a4\u30c8\u30eb\u3068\u8aac\u660e\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30c6\u30ad\u30b9\u30c8\u3092\u751f\u6210\u3057\u307e\u3059\u3002\u30c0\u30a4\u30a2\u30ed\u30b0\u306f\u3001\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;\/testrail\/docs\/702\/wp-content\/uploads\/push-defect.png&#8221; _builder_version=&#8221;4.4.2&#8243;][\/et_pb_image][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221;]<\/p>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u3001<strong>_bugs_get_projects<\/strong> \u306a\u3069\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u5b8c\u5168\u306b\u306f\u5b9f\u88c5\u3057\u3066\u3044\u307e\u305b\u3093\u3002\u5b8c\u5168\u306b\u6a5f\u80fd\u3059\u308b\u30d7\u30e9\u30b0\u30a4\u30f3\u3067\u306f\u3001\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u6b20\u9665\u30c8\u30e9\u30c3\u30ab\u30fc\u306e Web \u30b5\u30fc\u30d3\u30b9 API \u3092\u4f7f\u3063\u3066\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30ea\u30b9\u30c8\u3092\u53d6\u5f97\u3059\u308b\u3067\u3057\u3087\u3046 (\u3042\u308b\u3044\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30ea\u30b9\u30c8\u3092\u8aad\u307f\u53d6\u308b\u3067\u3057\u3087\u3046)\u3002\u3053\u306e\u4f8b\u3067\u306f\u3001\u5358\u306b\u30cf\u30fc\u30c9\u30b3\u30fc\u30c9\u3055\u308c\u305f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30ea\u30b9\u30c8\u3092\u8fd4\u3057\u307e\u3059 (\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u983b\u7e41\u306b\u306f\u5909\u66f4\u3055\u308c\u306a\u3044\u5834\u5408\u3001\u3053\u308c\u3082\u6709\u52b9\u306a\u5b9f\u88c5\u65b9\u6cd5\u306b\u306a\u308a\u5f97\u307e\u3059)\u3002<\/p>\n<p>[\/et_pb_text][et_pb_code _builder_version=&#8221;4.4.2&#8243;]<\/p>\n<pre class=\"language-php\"><code class=\"language-php\"><!-- [et_pb_line_break_holder] -->private function _bugs_get_projects()<!-- [et_pb_line_break_holder] -->{<!-- [et_pb_line_break_holder] -->\treturn array(<!-- [et_pb_line_break_holder] -->\t\t'dh' =&gt; 'Datahub',<!-- [et_pb_line_break_holder] -->\t\t'pr' =&gt; 'Presenter',<!-- [et_pb_line_break_holder] -->\t\t'wr' =&gt; 'Writer'<!-- [et_pb_line_break_holder] -->\t);<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><\/code><\/pre>\n<p>[\/et_pb_code][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221;]<\/p>\n<p>\u3053\u3053\u3067\u306f\u3001\u914d\u5217\u30ad\u30fc\u3068\u3057\u3066 ID \u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u3053\u3068\u306b\u6ce8\u76ee\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30e6\u30fc\u30b6\u30fc\u304c\u9001\u4fe1\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001TestRail \u306f\u3053\u308c\u3089\u306e ID \u3092\u5165\u529b\u5024\u3068\u3057\u3066 <strong>push<\/strong> \u30e1\u30bd\u30c3\u30c9\u306b\u6e21\u3057\u307e\u3059\u3002<strong>push<\/strong> \u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u88c5\u3059\u308b\u524d\u306b\u3001<strong>validate_push<\/strong> \u30e1\u30bd\u30c3\u30c9\u3092\u7c21\u5358\u306b\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306b\u3088\u308a\u3001\u30d0\u30b0 \u30ec\u30dd\u30fc\u30c8\u306b\u5165\u529b\u3055\u308c\u305f\u5024\u3092\u53d7\u3051\u5165\u308c\u308b\u524d\u306b\u30e6\u30fc\u30b6\u30fc\u5165\u529b\u3092\u691c\u8a3c\u3067\u304d\u307e\u3059\u3002\u30c7\u30fc\u30bf\u3092\u691c\u8a3c\u3059\u308b\u5fc5\u8981\u304c\u306a\u3044\u5834\u5408\u306f\u3001\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u88c5\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u7279\u5b9a\u306e\u5165\u529b\u5f62\u5f0f\u3084\u5236\u7d04 (\u65e5\u4ed8\u306a\u3069) \u3092\u5f37\u5236\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002\u6b21\u306e\u4f8b\u3067\u306f\u3001<strong>validate_push<\/strong>\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u3001\u8981\u7d04\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u6587\u5b57\u6570\u3092 100 \u6587\u5b57\u307e\u3067\u306b\u5236\u9650\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>[\/et_pb_text][et_pb_code _builder_version=&#8221;4.4.2&#8243;]<code class=\"language-php\"><\/code><\/p>\n<p><code class=\"language-php\"><code class=\"language-php\"><\/code><\/code><\/p>\n<pre class=\"language-php\"><!-- [et_pb_line_break_holder] -->public function validate_push($context, $input)<!-- [et_pb_line_break_holder] -->{<!-- [et_pb_line_break_holder] -->\tif (isset($input['summary']))<!-- [et_pb_line_break_holder] -->\t{<!-- [et_pb_line_break_holder] -->\t\tif (str::len($input['summary']) &gt; 100)<!-- [et_pb_line_break_holder] -->\t\t{<!-- [et_pb_line_break_holder] -->\t\t\tthrow new ValidationException(<!-- [et_pb_line_break_holder] -->\t\t\t\t'Field Summary cannot exceed 100 characters.');<!-- [et_pb_line_break_holder] -->\t\t}<!-- [et_pb_line_break_holder] -->\t}<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><\/pre>\n<p><code class=\"language-php\"><\/code>[\/et_pb_code][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221;]<\/p>\n<p>\u30e6\u30fc\u30b6\u30fc\u304c\u30d0\u30b0 \u30ec\u30dd\u30fc\u30c8\u3092\u5165\u529b\u3057\u3066\u9001\u4fe1\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u304c <strong>validate_push<\/strong> \u30e1\u30bd\u30c3\u30c9\u306b\u3088\u3063\u3066\u5165\u529b\u3092\u691c\u8a3c\u3057\u305f\u3089\u3001TestRail \u306f <strong>push<\/strong> \u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3057\u3066\u30d0\u30b0 \u30ec\u30dd\u30fc\u30c8\u3092\u9001\u4fe1\u3057\u307e\u3059\u3002\u4e0a\u8a18\u306e\u30c0\u30a4\u30a2\u30ed\u30b0\u306a\u3057\u306e\u4f8b\u3068\u540c\u69d8\u306b\u3001push \u30e1\u30bd\u30c3\u30c9\u306f\u30ec\u30dd\u30fc\u30c8\u3092\u9001\u4fe1\u3057\u307e\u3059\u3002\u4eca\u56de\u306f\u3001<strong>$context<\/strong> \u5f15\u6570\u304b\u3089\u30d0\u30b0 \u30ec\u30dd\u30fc\u30c8\u3092\u4f5c\u6210\u3059\u308b\u4ee3\u308f\u308a\u306b\u3001<strong>$input<\/strong> \u5f15\u6570\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>[\/et_pb_text][et_pb_code _builder_version=&#8221;4.4.2&#8243;]<\/p>\n<pre class=\"language-php\"><code class=\"language-php\"><!-- [et_pb_line_break_holder] -->public function push($context, $input)<!-- [et_pb_line_break_holder] -->{<!-- [et_pb_line_break_holder] -->\t\/\/ Push the defect and return the new defect ID<!-- [et_pb_line_break_holder] -->\t$defect_id = $this-&gt;_bugs_push_defect(<!-- [et_pb_line_break_holder] -->\t\t$input['summary'],<!-- [et_pb_line_break_holder] -->\t\t$input['description'],<!-- [et_pb_line_break_holder] -->\t\t$input['project'],<!-- [et_pb_line_break_holder] -->\t\t$input['type'],<!-- [et_pb_line_break_holder] -->\t\t$input['component']<!-- [et_pb_line_break_holder] -->\t);<!-- [et_pb_line_break_holder] -->\treturn $defect_id;<!-- [et_pb_line_break_holder] -->}<!-- [et_pb_line_break_holder] --><\/code><\/pre>\n<p>[\/et_pb_code][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221; hover_enabled=&#8221;0&#8243;]<\/p>\n<p>\u3053\u308c\u3067\u7d42\u308f\u308a\u3067\u3059\u3002\u3053\u308c\u3067\u3001\u691c\u7d22\u6a5f\u80fd\u3068\u30d7\u30c3\u30b7\u30e5\u6a5f\u80fd\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3001TestRail \u5185\u304b\u3089\u7ba1\u7406\u8005\u304c\u8a2d\u5b9a\u3067\u304d\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8 \u30ea\u30b9\u30c8\u306e\u30ab\u30b9\u30b1\u30fc\u30c9 \u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u5168\u4f53\u3092\u6b63\u3057\u304f\u5b9f\u88c5\u3067\u304d\u307e\u3057\u305f\u3002\u4e0b\u8a18\u306e\u5b8c\u5168\u306a\u30b5\u30f3\u30d7\u30eb \u30b9\u30af\u30ea\u30d7\u30c8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u307b\u304b\u3001\u305d\u306e\u4ed6\u306e\u30b5\u30f3\u30d7\u30eb \u30b9\u30af\u30ea\u30d7\u30c8\u3092\u53c2\u7167\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section][et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;4.4.2&#8243;][et_pb_row _builder_version=&#8221;4.4.2&#8243;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.2&#8243;][et_pb_text admin_label=&#8221;Standard Text&#8221; _builder_version=&#8221;4.4.2&#8243; width=&#8221;100%&#8221;]<\/p>\n<h2>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/h2>\n<div class=\"level2\">\n<p>\u3053\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u8aac\u660e\u3057\u305f\u30b5\u30f3\u30d7\u30eb \u30b9\u30af\u30ea\u30d7\u30c8\u5168\u4f53\u306f\u3001\u3053\u3053\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><a class=\"urlextern\" href=\"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/702\/wp-content\/uploads\/bugs.zip\" target=\"_blank\" rel=\"noopener\">\u30b5\u30f3\u30d7\u30eb<\/a> (8KB)<\/p>\n<p>\u5b9f\u969b\u306e\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u4ed6\u306e\u4f8b\u3092\u898b\u308b\u306b\u306f\u3001TestRail \u306b\u540c\u68b1\u3055\u308c\u3066\u3044\u308b\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u898b\u3066\u307f\u308b\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002\u6b20\u9665\u30d7\u30e9\u30b0\u30a4\u30f3\u306f TestRail \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306e <strong>app\/plugins\/defects<\/strong> \u306b\u3042\u308a\u307e\u3059\u3002<\/p>\n<\/div>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;4.4.2&#8243;][et_pb_row _builder_version=&#038;#822 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":6614,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"class_list":["post-6619","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/702\/wp-json\/wp\/v2\/pages\/6619","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/702\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/702\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/702\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/702\/wp-json\/wp\/v2\/comments?post=6619"}],"version-history":[{"count":69,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/702\/wp-json\/wp\/v2\/pages\/6619\/revisions"}],"predecessor-version":[{"id":14320,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/702\/wp-json\/wp\/v2\/pages\/6619\/revisions\/14320"}],"up":[{"embeddable":true,"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/702\/wp-json\/wp\/v2\/pages\/6614"}],"wp:attachment":[{"href":"https:\/\/docs.testrail.techmatrix.jp\/testrail\/docs\/702\/wp-json\/wp\/v2\/media?parent=6619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}