count_of_feedback.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * 按系统统计的反馈总数。
  4. * Count of feedback.
  5. *
  6. * 范围:system
  7. * 对象:feedback
  8. * 目的:scale
  9. * 度量名称:按系统统计的反馈总数
  10. * 单位:个
  11. * 描述:按系统统计的反馈总数是指收集到的所有用户反馈的数量。这个度量项可以帮助团队了解用户对产品的关注点和问题,并作为改进产品质量和用户满意度的依据。较高的反馈总数可能暗示着用户的活跃度和关注度较高,需要团队及时响应和处理,同时暗示产品问题可能有很多。
  12. * 定义:所有的反馈个数求和;过滤已删除的反馈;过滤已删除的产品;
  13. *
  14. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  15. * @author zhouxin <zhouxin@easycorp.ltd>
  16. * @package
  17. * @uses func
  18. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  19. * @Link https://www.zentao.net
  20. */
  21. class count_of_feedback extends baseCalc
  22. {
  23. public $dataset = 'getAllFeedbacks';
  24. public $fieldList = array('t1.id');
  25. public $result = 0;
  26. public function calculate($data)
  27. {
  28. $this->result += 1;
  29. }
  30. public function getResult($options = array())
  31. {
  32. $records = array(array('value' => $this->result));
  33. return $this->filterByOptions($records, $options);
  34. }
  35. }