bug.php 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. $this->app->loadLang('bug');
  3. $this->app->loadLang('product');
  4. $this->app->loadLang('story');
  5. $this->app->loadLang('project');
  6. $this->app->loadLang('tree');
  7. $schema = new stdclass();
  8. $schema->primaryTable = 'bug';
  9. $schema->tables = array();
  10. $schema->tables['bug'] = 'zt_bug';
  11. $schema->tables['product'] = 'zt_product';
  12. $schema->tables['story'] = 'zt_story';
  13. $schema->tables['productline'] = 'zt_module';
  14. $schema->tables['program'] = 'zt_project';
  15. $schema->tables['project'] = 'zt_project';
  16. $schema->tables['bugmodule'] = 'zt_module';
  17. $schema->joins = array();
  18. $schema->joins['product'] = '`product`.`id` = `bug`.`product`';
  19. $schema->joins['story'] = '`story`.`id` = `bug`.`story`';
  20. $schema->joins['productline'] = '`productline`.`id` = `product`.`line`';
  21. $schema->joins['program'] = '`program`.`id` = `product`.`program`';
  22. $schema->joins['project'] = '`project`.`id` = `bug`.`project`';
  23. $schema->joins['bugmodule'] = '`bugmodule`.`id` = `bug`.`module`';
  24. $schema->fields = array();
  25. $schema->fields['id'] = array('type' => 'number', 'name' => $this->lang->bug->id);
  26. $schema->fields['title'] = array('type' => 'string', 'name' => $this->lang->bug->title);
  27. $schema->fields['steps'] = array('type' => 'text', 'name' => $this->lang->bug->steps);
  28. $schema->fields['status'] = array('type' => 'option', 'name' => $this->lang->bug->status, 'options' => $this->lang->bug->statusList);
  29. $schema->fields['type'] = array('type' => 'option', 'name' => $this->lang->bug->type, 'options' => $this->lang->bug->typeList);
  30. $schema->fields['confirmed'] = array('type' => 'option', 'name' => $this->lang->bug->confirmed, 'options' => $this->lang->bug->confirmedList);
  31. $schema->fields['severity'] = array('type' => 'option', 'name' => $this->lang->bug->severity, 'options' => $this->lang->bug->severityList);
  32. $schema->fields['product'] = array('type' => 'object', 'name' => $this->lang->bug->product, 'object' => 'product', 'show' => 'product.name');
  33. $schema->fields['project'] = array('type' => 'object', 'name' => $this->lang->bug->project, 'object' => 'project', 'show' => 'project.name');
  34. $schema->fields['bugmodule'] = array('type' => 'object', 'name' => $this->lang->bug->module, 'object' => 'bugmodule', 'show' => 'bugmodule.name');
  35. $schema->fields['story'] = array('type' => 'object', 'name' => $this->lang->story->common, 'object' => 'story', 'show' => 'story.title');
  36. $schema->fields['pri'] = array('type' => 'option', 'name' => $this->lang->bug->pri, 'options' => $this->lang->bug->priList);
  37. $schema->fields['assignedTo'] = array('type' => 'user', 'name' => $this->lang->bug->assignedTo);
  38. $schema->fields['assignedDate'] = array('type' => 'date', 'name' => $this->lang->bug->assignedDate);
  39. $schema->fields['openedBy'] = array('type' => 'user', 'name' => $this->lang->bug->openedBy);
  40. $schema->fields['openedDate'] = array('type' => 'date', 'name' => $this->lang->bug->openedDate);
  41. $schema->fields['resolvedBy'] = array('type' => 'user', 'name' => $this->lang->bug->resolvedBy);
  42. $schema->fields['resolution'] = array('type' => 'option', 'name' => $this->lang->bug->resolution, 'options' => $this->lang->bug->resolutionList);
  43. $schema->fields['resolvedDate'] = array('type' => 'date', 'name' => $this->lang->bug->resolvedDate);
  44. $schema->fields['closedBy'] = array('type' => 'user', 'name' => $this->lang->bug->closedBy);
  45. $schema->fields['closedDate'] = array('type' => 'date', 'name' => $this->lang->bug->closedDate);
  46. $schema->objects = array();
  47. $schema->objects['story'] = array();
  48. $schema->objects['story']['id'] = array('type' => 'number', 'name' => $this->lang->story->id);
  49. $schema->objects['story']['title'] = array('type' => 'string', 'name' => $this->lang->story->common);
  50. $schema->objects['product'] = array();
  51. $schema->objects['product']['id'] = array('type' => 'number', 'name' => $this->lang->product->id);
  52. $schema->objects['product']['name'] = array('type' => 'string', 'name' => $this->lang->product->common);
  53. $schema->objects['project'] = array();
  54. $schema->objects['project']['id'] = array('type' => 'number', 'name' => $this->lang->project->id);
  55. $schema->objects['project']['name'] = array('type' => 'string', 'name' => $this->lang->project->common);
  56. $schema->objects['bugmodule'] = array();
  57. $schema->objects['bugmodule']['id'] = array('type' => 'number', 'name' => $this->lang->bug->id);
  58. $schema->objects['bugmodule']['name'] = array('type' => 'string', 'name' => $this->lang->tree->module);