阶段目标
原能力
为预热、主要发布与后续澄清分配任务和观察指标。(细化版 p.6–7)
首选项目
OpenProject(GPL-3.0(社区代码))。 OpenProject
匹配范围
里程碑与各阶段 Goal 记录可观测目标。
源码
OpenProject · class WorkPackage
app/models/work_package.rb · 30–43 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
class WorkPackage < ApplicationRecord
include WorkPackage::SemanticIdentifier
include WorkPackage::Validations
include WorkPackage::SchedulingRules
include WorkPackage::StatusTransitions
include WorkPackage::AskBeforeDestruction
include WorkPackage::TimeEntriesCleaner
include WorkPackage::Ancestors
include WorkPackage::Automatable
include WorkPackage::Hooks
include WorkPackage::Origin
# Must stay above WorkPackage::Journalized: its after_save persists the
# version rows that the journal snapshot then reads.
include WorkPackage::Versions
- #-- copyright
- # Copyright (C) the OpenProject GmbH
- # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
- # Copyright (C) 2006-2013 Jean-Philippe Lang
- # Copyright (C) 2010-2013 the ChiliProject Team
- # See COPYRIGHT and LICENSE files for more details.
Matomo · public function get(
plugins/Goals/API.php · 892–905 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
public function get($idSite, string $period, string $date, $segment = false, $idGoal = false, $columns = [], bool $showAllGoalSpecificMetrics = false, bool $compare = false)
{
Piwik::checkUserHasViewAccess($idSite);
$table = null;
$segments = array(
'' => false,
'_new_visit' => VisitFrequencyAPI::NEW_VISITOR_SEGMENT,
'_returning_visit' => VisitFrequencyAPI::RETURNING_VISITOR_SEGMENT,
);
foreach ($segments as $appendToMetricName => $predefinedSegment) {
$startingArchiveDependent = \Piwik\Plugin\Archiver::$ARCHIVE_DEPENDENT;
实现与验收要点
形成预热与主发布不同口径,防止跨阶段重复计数。