# 业务对象-附件
# 扩展模块介绍
TAPD提供业务对象页面附件区域的扩展能力,主要提供附件下拉入口以及附件API服务。
交互效果如下:
附件下拉菜单中,提供第三方应用的扩展入口,第三方开发者需提供【入口名称】、【入口URL】、【弹框高度】和【弹框宽度】。

当用户点击下拉菜单后,自动触发系统级弹框的显示,弹框中会显示出第三方应用配置的入口URL。

此处交互会涉及到弹框事件的交互,请参考 事件通信.
- 如果第三方应用需要与 Tapd 附件数据进行集成,可以通过 API来实现新增附件与更新附件。操作数据完成后,会在下方的附件列表中进行查看。(点击编辑进入编辑页)

# 配置方法
附件扩展模块配置数据
| 参数名称 | 必选 | 参数描述 | 规则 |
|---|---|---|---|
| name | 是 | 应用名称 | 最大长度:10 |
| url | 是 | 应用入口地址 | URL格式 |
| height | 是 | 设置入口弹框高度 | INT(1,600) |
| width | 是 | 设置入口弹框宽度 | INT(1,800) |
扩展模块上下文参数
上下文参数可以让开发者通过在扩展模块的入口地址或者其他配置拼接相应的参数来获取上下文信息
项目级上下文参数
详情请见项目级上下文参数
业务对象通用参数
| 参数名称 | 参数描述 |
|---|---|
| object.type | 业务对象类型,值范围:story: 需求,bug: 缺陷,task: 任务 |
| object.id | 业务对象 ID |
- 需求参数
| | 参数名称 | 参数描述 |
|---|---|
| object.name | 标题 |
| object.short_id | 短id |
| object.workitem_type_id | - |
| object.creator | - |
| object.created | - |
| object.modified | - |
| object.parent_id | - |
| object.children_id | - |
| object.ancestor_id | - |
| object.path | - |
| object.workspace_id | - |
| object.status | - |
| object.priority | - |
| object.owner | - |
| object.cc | - |
| object.begin | - |
| object.due | - |
| object.source | - |
| object.iteration_id | - |
| object.module | - |
| object.completed | - |
| object.templated_id | - |
| object.business_value | - |
| object.size | - |
| object.effort | - |
| object.effort_completed | - |
| object.exceed | - |
| object.remain | - |
| object.progress | - |
| object.release_id | - |
| object.feature | - |
| object.developer | - |
| object.test_focus | - |
| object.category_id | - |
| object.version | - |
| object.confidential | - |
| object.created_from | - |
| object.label | - |
| object.custom_field_one | 自定义字段一(可能会有) |
| object.custom_field_two | 自定义字段二(可能会有) |
| object.custom_field_9 | 自定义字段九(可能会有),大于八用阿拉伯数字 |
- 缺陷参数
| | 参数名称 | 参数描述 |
|---|---|
| object.title | 标题 |
| object.short_id | 短id |
| object.project_id | - |
| object.module | - |
| object.milestone | - |
| object.reporter | - |
| object.deadline | - |
| object.created | - |
| object.resolved | - |
| object.closed | - |
| object.modified | - |
| object.lastmodify | - |
| object.auditer | - |
| object.de | - |
| object.te | - |
| object.confirmer | - |
| object.current_owner | - |
| object.participator | - |
| object.closer | - |
| object.status | - |
| object.resolution | - |
| object.priority | - |
| object.severity | - |
| object.platform | - |
| object.os | - |
| object.testmode | - |
| object.testtype | - |
| object.testphase | - |
| object.source | - |
| object.frequency | - |
| object.cc | - |
| object.estimate | - |
| object.flows | - |
| object.version_report | - |
| object.version_test | - |
| object.version_fix | - |
| object.version_close | - |
| object.regression_number | - |
| object.issue_id | - |
| object.created_from | - |
| object.baseline_find | - |
| object.baseline_join | - |
| object.baseline_close | - |
| object.baseline_test | - |
| object.story_id | - |
| object.originphase | - |
| object.sourcephase | - |
| object.bugtype | - |
| object.feature | - |
| object.in_progress_time | - |
| object.verify_time | - |
| object.reject_time | - |
| object.reopen_time | - |
| object.audit_time | - |
| object.suspend_time | - |
| object.assigned_time | - |
| object.iteration_id | - |
| object.template_id | - |
| object.begin | - |
| object.due | - |
| object.release_id | - |
| object.fixer | - |
| object.label | - |
| object.effort | - |
| object.effort_completed | - |
| object.exceed | - |
| object.remain | - |
| object.size | - |
| object.custom_field_one | 自定义字段一(可能会有) |
| object.custom_field_two | 自定义字段二(可能会有) |
| object.custom_field_6 | 自定义字段六(可能会有),大于五用阿拉伯数字 |
- 任务参数
| | 参数名称 | 参数描述 |
|---|---|
| object.name | 标题 |
| object.short_id | 任务短id |
| object.creator | - |
| object.created | - |
| object.modified | - |
| object.workspace_id | - |
| object.status | - |
| object.priority | - |
| object.owner | - |
| object.cc | - |
| object.begin | - |
| object.due | - |
| object.story_id | - |
| object.iteration_id | - |
| object.completed | - |
| object.effort | - |
| object.effort_completed | - |
| object.exceed | - |
| object.remain | - |
| object.progress | - |
| object.has_attachment | - |
| object.label | - |
| object.release_id | - |
| object.custom_field_one | 任务的自定义字段一(可能会有) |
| object.custom_field_two | 任务的自定义字段二(可能会有) |
| object.custom_field_9 | 任务的自定义字段九(可能会有),大于八用阿拉伯数字 |
# Demo
{
//required max:20 附件添加文案
"name" : "关联Demo附件",
//required 关联附件弹框地址
"url" : "http://lion.oa.com/~jasperwei/tapd3//open_demo/app_for_obj_attachment?workspace_id=$workspace.id$&obj_type=$object.type$&obj_id=$object.id$",
//required default: 400 max: 600 附件弹框高度
"height": 400,
//required default: 600 max: 800 附件弹框宽度
"width" : 600
}
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
← 业务对象-复制链接 编辑器toolbar →