禅道18.0_beta如何在项目需求列表页面添加自定义字段显示

1.数据库表 zt_story 添加自定义字段 extraNumber

2.扩展 module 下的 story
扩展config
在 extension/custom 新建 story/ext/config/test.php (名字随意),内容

<?php
$config->story->datatable->defaultField = array('id','extraNumber', 'title', 'pri', 'plan', 'status', 'estimate', 'reviewedBy', 'stage', 'assignedTo', 'openedBy', 'openedDate', 'actions');

$config->story->datatable->fieldList['orderNumber']['title']    = 'extraNumber';
$config->story->datatable->fieldList['orderNumber']['fixed']    = 'left';
$config->story->datatable->fieldList['orderNumber']['type']     = 'html';
$config->story->datatable->fieldList['orderNumber']['sortType'] = true;
$config->story->datatable->fieldList['orderNumber']['width']    = '100';
$config->story->datatable->fieldList['orderNumber']['required'] = 'yes';

扩展lang
在 extension/custom 新建 story/ext/lang/zh-cn/test.php (名字随意),内容

<?php
$lang->story->extraNumber= "第三方需求单号";

扩展model
在 extension/custom 新建 story/ext/module/printCell.php 扩展现有的方法名字不能随意,必须是module里存在的方法名
在第 153行添加

case 'extraNumber':
     echo $story->extraNumber;
     break;

这样列表里面才会有值

posted @   猝死的路上  阅读(442)  评论(1编辑  收藏  举报
相关博文:
阅读排行:
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· DeepSeek “源神”启动!「GitHub 热点速览」
· 我与微信审核的“相爱相杀”看个人小程序副业
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库
· 上周热点回顾(2.17-2.23)
点击右上角即可分享
微信分享提示