当前位置: 首页>>代码示例>>PHP>>正文


PHP Tracker_Artifact_Changeset::getArtifact方法代码示例

本文整理汇总了PHP中Tracker_Artifact_Changeset::getArtifact方法的典型用法代码示例。如果您正苦于以下问题:PHP Tracker_Artifact_Changeset::getArtifact方法的具体用法?PHP Tracker_Artifact_Changeset::getArtifact怎么用?PHP Tracker_Artifact_Changeset::getArtifact使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Tracker_Artifact_Changeset的用法示例。


在下文中一共展示了Tracker_Artifact_Changeset::getArtifact方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: exportSnapshotWithoutComments

 /**
  * Same as exportFullHistory() but only the current state of the artifact
  */
 public function exportSnapshotWithoutComments(SimpleXMLElement $artifacts_xml, Tracker_Artifact_Changeset $changeset)
 {
     $artifact_xml = $artifacts_xml->addChild('artifact');
     $artifact_xml->addAttribute('id', $changeset->getArtifact()->getId());
     $artifact_xml->addAttribute('tracker_id', $changeset->getArtifact()->getTrackerId());
     $this->changeset_exporter->exportWithoutComments($artifact_xml, $changeset);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:10,代码来源:ArtifactXMLExporter.php

示例2: getFullRESTValue

 public function getFullRESTValue(PFUser $user, Tracker_Artifact_Changeset $changeset)
 {
     $classname_with_namespace = 'Tuleap\\Tracker\\REST\\Artifact\\ArtifactFieldValueFullRepresentation';
     $artifact_field_value_full_representation = new $classname_with_namespace();
     $artifact_field_value_full_representation->build($this->getId(), Tracker_FormElementFactory::instance()->getType($this), $this->getLabel(), (int) $changeset->getArtifact()->getPerTrackerArtifactId());
     return $artifact_field_value_full_representation;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:Tracker_FormElement_Field_PerTrackerArtifactIdclass.php

示例3: getRawMailForChangeset

 private function getRawMailForChangeset(Tracker_Artifact_Changeset $changeset)
 {
     $raw_mails = $this->getCachedRawMailByChangesetsForArtifact($changeset->getArtifact());
     $changeset_id = $changeset->getId();
     if (isset($raw_mails[$changeset_id])) {
         return $raw_mails[$changeset_id];
     }
     return null;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:9,代码来源:IncomingMailGoldenRetriever.php

示例4: exportFullHistory

 public function exportFullHistory(SimpleXMLElement $artifact_xml, Tracker_Artifact_Changeset $changeset)
 {
     $changeset_xml = $artifact_xml->addChild('changeset');
     $this->user_xml_exporter->exportUserByUserId($changeset->getSubmittedBy(), $changeset_xml, 'submitted_by');
     $submitted_on = $changeset_xml->addChild('submitted_on', date('c', $changeset->getSubmittedOn()));
     $submitted_on->addAttribute('format', 'ISO8601');
     $comments_node = $changeset_xml->addChild('comments');
     if ($changeset->getComment()) {
         $changeset->getComment()->exportToXML($comments_node);
     }
     $this->values_exporter->exportChangedFields($artifact_xml, $changeset_xml, $changeset->getArtifact(), $changeset->getValues());
 }
开发者ID:uniteddiversity,项目名称:tuleap,代码行数:12,代码来源:ChangesetXMLExporter.class.php

示例5: getCrossReferenceListForREST

 private function getCrossReferenceListForREST(Tracker_Artifact_Changeset $changeset)
 {
     $crf = new CrossReferenceFactory($changeset->getArtifact()->getId(), Tracker_Artifact::REFERENCE_NATURE, $this->getTracker()->getGroupId());
     $crf->fetchDatas();
     $list = array();
     $refs = $crf->getFormattedCrossReferences();
     if (!empty($refs['target'])) {
         foreach ($refs['target'] as $refTgt) {
             $list[] = array(self::REST_REF_INDEX => $refTgt['ref'], self::REST_REF_URL => $refTgt['url'], self::REST_REF_DIRECTION => self::REST_REF_DIRECTION_OUT);
         }
     }
     if (!empty($refs['source'])) {
         foreach ($refs['source'] as $refSrc) {
             $list[] = array(self::REST_REF_INDEX => $refSrc['ref'], self::REST_REF_URL => $refSrc['url'], self::REST_REF_DIRECTION => self::REST_REF_DIRECTION_IN);
         }
     }
     if (!empty($refs['both'])) {
         foreach ($refs['both'] as $refBoth) {
             $list[] = array(self::REST_REF_INDEX => $refBoth['ref'], self::REST_REF_URL => $refBoth['url'], self::REST_REF_DIRECTION => self::REST_REF_DIRECTION_BOTH);
         }
     }
     return $list;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:23,代码来源:Tracker_FormElement_Field_CrossReferences.class.php

示例6: getChangesetValue

 /**
  * Get the value of this field
  *
  * @param Tracker_Artifact_Changeset $changeset   The changeset (needed in only few cases like 'lud' field)
  * @param int                        $value_id    The id of the value
  * @param boolean                    $has_changed If the changeset value has changed from the rpevious one
  *
  * @return Tracker_Artifact_ChangesetValue or null if not found
  */
 public function getChangesetValue($changeset, $value_id, $has_changed)
 {
     $rows = $this->getValueDao()->searchById($value_id, $this->id);
     $artifact_links = $this->getArtifactLinkInfos($rows);
     $reverse_artifact_links = array();
     if ($changeset) {
         $reverse_artifact_links = $this->getReverseLinks($changeset->getArtifact()->getId());
     }
     return new Tracker_Artifact_ChangesetValue_ArtifactLink($value_id, $this, $has_changed, $artifact_links, $reverse_artifact_links);
 }
开发者ID:rinodung,项目名称:tuleap,代码行数:19,代码来源:Tracker_FormElement_Field_ArtifactLink.class.php

示例7: getFullRESTValue

 public function getFullRESTValue(PFUser $user, Tracker_Artifact_Changeset $changeset)
 {
     $value = new Tracker_FormElement_Field_List_Bind_UsersValue($changeset->getArtifact()->getSubmittedBy());
     $submitted_by_value = $value->getFullRESTValue($this);
     $classname_with_namespace = 'Tuleap\\Tracker\\REST\\Artifact\\ArtifactFieldValueFullRepresentation';
     $artifact_field_value_full_representation = new $classname_with_namespace();
     $artifact_field_value_full_representation->build($this->getId(), Tracker_FormElementFactory::instance()->getType($this), $this->getLabel(), $submitted_by_value);
     return $artifact_field_value_full_representation;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:9,代码来源:Tracker_FormElement_Field_SubmittedBy.class.php

示例8: getChangesetValue

 /**
  * Get the value of this field
  *
  * @param Tracker_Artifact_Changeset $changeset   The changeset (needed in only few cases like 'lud' field)
  * @param int                        $value_id    The id of the value
  * @param boolean                    $has_changed If the changeset value has changed from the previous one
  *
  * @return Tracker_Artifact_ChangesetValue or null if not found
  */
 public function getChangesetValue($changeset, $value_id, $has_changed)
 {
     $changeset_value = null;
     $value_ids = $this->getValueDao()->searchById($value_id, $this->id);
     $ugroups = array();
     foreach ($value_ids as $v) {
         $ugroups[] = $v['ugroup_id'];
     }
     $changeset_value = new Tracker_Artifact_ChangesetValue_PermissionsOnArtifact($value_id, $this, $has_changed, $changeset->getArtifact()->useArtifactPermissions(), $ugroups);
     return $changeset_value;
 }
开发者ID:nterray,项目名称:tuleap,代码行数:20,代码来源:Tracker_FormElement_Field_PermissionsOnArtifact.class.php

示例9: after

 /**
  * @see Transition_PostAction::after()
  * @param Tracker_Artifact_Changeset $changeset
  */
 public function after(Tracker_Artifact_Changeset $changeset)
 {
     if (!$this->isDefined()) {
         return;
     }
     $build_parameters = array(self::BUILD_PARAMETER_USER => $changeset->getSubmittedBy(), self::BUILD_PARAMETER_PROJECT_ID => $changeset->getArtifact()->getTracker()->getProject()->getID(), self::BUILD_PARAMETER_ARTIFACT_ID => $changeset->getArtifact()->getId(), self::BUILD_PARAMETER_TRACKER_ID => $changeset->getArtifact()->getTracker()->getId(), self::BUILD_PARAMETER_TRIGGER_FIELD_VALUE => $this->getTransition()->getFieldValueTo()->getLabel());
     try {
         $this->ci_client->launchJobBuild($this->job_url, $build_parameters);
         $feedback = $GLOBALS['Language']->getText('workflow_postaction', 'ci_build_succeeded', array($this->job_url));
         $GLOBALS['Response']->addFeedback('info', $feedback);
     } catch (Jenkins_ClientUnableToLaunchBuildException $exception) {
         $GLOBALS['Response']->addFeedback('error', $exception->getMessage());
     }
 }
开发者ID:rinodung,项目名称:tuleap,代码行数:18,代码来源:Transition_PostAction_CIBuild.class.php

示例10: getFromUserAndChangeset

 /** @return Tracker_Artifact_MailGateway_Recipient */
 public function getFromUserAndChangeset(PFUser $user, Tracker_Artifact_Changeset $changeset)
 {
     $artifact = $changeset->getArtifact();
     return new Tracker_Artifact_MailGateway_Recipient($user, $artifact, $this->getEmail($user, $artifact, $changeset));
 }
开发者ID:rinodung,项目名称:tuleap,代码行数:6,代码来源:RecipientFactory.class.php

示例11: getChangesetValue

 /**
  * Get the value of this field
  *
  * @param Tracker_Artifact_Changeset $changeset   The changeset (needed in only few cases like 'lud' field)
  * @param int                        $value_id    The id of the value
  * @param boolean                    $has_changed If the changeset value has changed from the rpevious one
  *
  * @return Tracker_Artifact_ChangesetValue or null if not found
  */
 public function getChangesetValue($changeset, $value_id, $has_changed)
 {
     $changeset_value = new Tracker_Artifact_ChangesetValue_Date($value_id, $this, $has_changed, $changeset->getArtifact()->getSubmittedOn());
     return $changeset_value;
 }
开发者ID:amanikamail,项目名称:tuleap,代码行数:14,代码来源:Tracker_FormElement_Field_SubmittedOn.class.php

示例12: after

 /**
  * Execute actions after transition happens (if there is one)
  *
  * @param PFUser                     $user               The user who changed things
  * @param Array                      $fields_data        Request field data (array[field_id] => data)
  * @param Tracker_Artifact_Changeset $new_changeset      The changeset that has just been created
  * @param Tracker_Artifact_Changeset $previous_changeset The changeset just before (null for a new artifact)
  *
  * @return void
  */
 public function after(array $fields_data, Tracker_Artifact_Changeset $new_changeset, Tracker_Artifact_Changeset $previous_changeset = null)
 {
     $this->logger->defineFingerprint($new_changeset->getArtifact()->getId());
     $this->logger->start(__METHOD__, $new_changeset->getId(), $previous_changeset ? $previous_changeset->getId() : 'null');
     if (isset($fields_data[$this->getFieldId()])) {
         $transition = $this->getCurrentTransition($fields_data, $previous_changeset);
         if ($transition) {
             $transition->after($new_changeset);
         }
     }
     $this->trigger_rules_manager->processTriggers($new_changeset);
     $this->logger->end(__METHOD__, $new_changeset->getId(), $previous_changeset ? $previous_changeset->getId() : 'null');
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:23,代码来源:Workflow.class.php

示例13: processTriggers

 public function processTriggers(Tracker_Artifact_Changeset $changeset)
 {
     $this->logger->start(__METHOD__, $changeset->getId());
     $dar_rules = $this->dao->searchForInvolvedRulesIdsByChangesetId($changeset->getId());
     foreach ($dar_rules as $row) {
         $rule = $this->getRuleById($row['rule_id']);
         $this->logger->debug("Found matching rule " . json_encode($rule->fetchFormattedForJson()));
         $this->rules_processor->process($changeset->getArtifact(), $rule);
     }
     $this->logger->end(__METHOD__, $changeset->getId());
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:11,代码来源:RulesManager.class.php

示例14: getRESTValue

 public function getRESTValue(PFUser $user, Tracker_Artifact_Changeset $changeset)
 {
     $classname_with_namespace = 'Tuleap\\Tracker\\REST\\Artifact\\ArtifactFieldValueRepresentation';
     $artifact = $changeset->getArtifact();
     try {
         $start_date = $this->getBurndownStartDate($artifact, $user);
     } catch (Tracker_FormElement_Field_BurndownException $ex) {
         $start_date = null;
     }
     try {
         $duration = $this->getBurndownDuration($artifact, $user);
     } catch (Tracker_FormElement_Field_BurndownException $ex) {
         $duration = null;
     }
     $artifact_field_value_representation = new $classname_with_namespace();
     $artifact_field_value_representation->build($this->getId(), $this->getLabel(), $this->getBurndownData($artifact, $user, $start_date, $duration)->getRESTRepresentation());
     return $artifact_field_value_representation;
 }
开发者ID:rinodung,项目名称:tuleap,代码行数:18,代码来源:Tracker_FormElement_Field_Burndown.class.php

示例15: addSummaryCommentChangeset

 private function addSummaryCommentChangeset(Tracker_Artifact $artifact, PFUser $user, Tracker_Artifact_Changeset $from_changeset)
 {
     $original_artifact = $from_changeset->getArtifact();
     $comment = $this->logger->getAllLogs();
     $comment[] = $GLOBALS['Language']->getText('plugin_tracker_artifact', 'copy_artifact_finished', array($original_artifact->getTracker()->getItemName(), $original_artifact->getId()));
     $artifact->createNewChangeset(array(), implode("\n", $comment), $user, true, Tracker_Artifact_Changeset_Comment::TEXT_COMMENT);
 }
开发者ID:amanikamail,项目名称:tuleap,代码行数:7,代码来源:CopyArtifact.class.php


注:本文中的Tracker_Artifact_Changeset::getArtifact方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。