和顺 / 势衡 返回所属 Agent
SH-03.02

资源可获得性

原能力

区分已承诺、待落实和估计可用的资金或人员,保留时点和来源。(细化版 p.8–9)

首选项目

OpenProject(GPL-3.0(社区代码))。 OpenProject

匹配范围

任务容量与时间聚合整理已承诺和待核资源。

源码

OpenProject · class WorkPackages::SetAttributesService

app/services/work_packages/set_attributes_service.rb · 30–43 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
class WorkPackages::SetAttributesService < BaseServices::SetAttributes
  include Attachments::SetReplacements

  private

  def validate_and_result
    result = super
    # restore identifier for error messages
    work_package.restore_identifier_after_failed_move unless result.success?
    result
  end

  def set_attributes(attributes)
    validate_custom_fields = attributes.delete(:validate_custom_fields)
  • #-- 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.

DuckDB · SinkResultType PhysicalHashAggregate::Sink(

src/execution/operator/aggregate/physical_hash_aggregate.cpp · 396–409 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
SinkResultType PhysicalHashAggregate::Sink(ExecutionContext &context, DataChunk &chunk,
                                           OperatorSinkInput &input) const {
	auto &local_state = input.local_state.Cast<HashAggregateLocalSinkState>();
	auto &global_state = input.global_state.Cast<HashAggregateGlobalSinkState>();

	if (distinct_collection_info) {
		SinkDistinct(context, chunk, input);
	}

	if (CanSkipRegularSink()) {
		return SinkResultType::NEED_MORE_INPUT;
	}

	DataChunk &aggregate_input_chunk = local_state.aggregate_input_chunk;

实现与验收要点

承诺授权、重复占用、来源和估计可靠性。