Add an issue to current context
@param IssueInterface $issue
@return void
977897
public function addIssue (IssueInterface $issue)
	{
		$length = count($this->stack);
		$this->stack[$length-1]->addIssue ($issue);
	}
792994
def issue_add(lancet, assign, add_to_sprint, summary):
    
    summary = " ".join(summary)
    issue = create_issue(
        lancet,
        summary,
        # project_id=project_id,
        add_to_active_sprint=add_to_sprint,
    )
    if assign:
        if assign == "me":
            username = lancet.tracker.whoami()
        else:
            username = assign
        assign_issue(lancet, issue, username)

    click.echo("Created issue")
1131821
def format_issues(issues)
      results = [t('myissues.info')]
      results.concat(issues.map { |issue| format_issue(issue) })
    end
540106
public function importIssueFile($id, $oldId, $issue, $slug)
    {
        $this->consoleOutput->writeln("Reading issue file #" . $id . "... ", true);

        $issueFileSql = "SELECT * FROM issue_files WHERE file_id = :id LIMIT 1";
        $issueFileStatement = $this->dbalConnection->prepare($issueFileSql);
        $issueFileStatement->bindValue('id', $id);
        $issueFileStatement->execute();

        $galleysSql = "SELECT galley_id, issue_id, locale, label FROM issue_galleys " .
            "WHERE issue_id = :issue_id AND file_id = :id";
        $galleysStatement = $this->dbalConnection->prepare($galleysSql);
        $galleysStatement->bindValue('issue_id', $oldId);
        $galleysStatement->bindValue('id', $id);
        $galleysStatement->execute();

        $pkpIssueFile = $issueFileStatement->fetch();
        $pkpGalleys = $galleysStatement->fetchAll();

        foreach ($pkpGalleys as $galley) {
            $locale = !empty($galley['locale']) ? mb_substr($galley['locale'], 0, 2, 'UTF-8') : 'en';
            $label = !empty($galley['label']) ? $galley['label'] : '-';
            $filename = sprintf('imported/%s/%s.%s',
                $galley['issue_id'],
                $galley['galley_id'],
                FileHelper::$mimeToExtMap[$pkpIssueFile['file_type']]);

            $issueFile = new IssueFile();
            $issueFile->setFile($filename);
            $issueFile->setIssue($issue);
            $issueFile->setVersion(0);
            $issueFile->setType(0);

            // Fill translatable fields
            $issueFile->setCurrentLocale($locale);
            $issueFile->setTitle($label);
            $issueFile->setDescription('-');

            $history = $this->em->getRepository(FileHistory::class)->findOneBy(['fileName' => $filename]);

            if (!$history) {
                $history = new FileHistory();
                $history->setFileName($filename);
                $history->setOriginalName($pkpIssueFile['original_file_name']);
                $history->setType('issuefiles');
                $this->em->persist($history);
            }

            $source = sprintf('%s/issue/download/%s/%s', $slug, $galley['issue_id'], $galley['galley_id']);
            $target = sprintf('/../web/uploads/issuefiles/imported/%s/%s.%s',
                $galley['issue_id'],
                $galley['galley_id'],
                FileHelper::$mimeToExtMap[$pkpIssueFile['file_type']]);

            $pendingDownload = new PendingDownload();
            $pendingDownload->setSource($source);
            $pendingDownload->setTarget($target);

            $this->em->persist($pendingDownload);
            $this->em->persist($issueFile);
        }
    }
1048899
public function addException($exception)
    {
        if ($exception->getMessage()) {
            $this->message .= "\n".$exception->getMessage();
        }

        $this->exceptions[] = $exception;
    }
844554
public function show(string $issue, array $params = [])
    {
        $path = $this->buildIssuesPath($issue);

        return $this->get($path, $params);
    }
55847
public function comments(string $issue)
    {
        return new Comments($this->getHttpClient(), $this->username, $this->repo, $issue);
    }
186089
def _populate_issue(self, graph: TraceGraph, instance_id: int) -> None:
        
        instance = graph._issue_instances[instance_id]
        issue = graph._issues[instance.issue_id.local_id]
        self._populate_shared_text(graph, instance.message_id)
        self._populate_shared_text(graph, instance.filename_id)
        self._populate_shared_text(graph, instance.callable_id)

        self.add_issue_instance(instance)
        self.add_issue(issue)

        if instance_id in graph._issue_instance_fix_info:
            issue_fix_info = graph._issue_instance_fix_info[instance_id]
            self.add_issue_instance_fix_info(instance, issue_fix_info)

        for shared_text_id in graph._issue_instance_shared_text_assoc[instance_id]:
            shared_text = graph._shared_texts[shared_text_id]
            if shared_text_id not in self._shared_texts:
                self.add_shared_text(shared_text)
            self.add_issue_instance_shared_text_assoc(instance, shared_text)
918416
public function render(ValidationIssue $issue)
    {
        if ($issue->pointer()->hasAtoms()) {
            return sprintf(
                "Validation failed for value at %s: %s",
                var_export($issue->pointer()->string(), true),
                $issue->constraint()->accept($this->constraintRenderer())
            );
        }

        return sprintf(
            "Validation failed for value at document root: %s",
            $issue->constraint()->accept($this->constraintRenderer())
        );
    }
518399
def all_issues(issues):
    """"""
    logging.info('finding issues...')
    seen = set()
    for issue in issues:
        if issue['title'] not in seen:
            seen.add(issue['title'])
            yield issue
262773
public void commitAndIndexIssues(DbSession dbSession, Collection<IssueDto> issues) {
    ListMultimap<String, EsQueueDto> itemsByIssueKey = ArrayListMultimap.create();
    issues.stream()
      .map(issue -> createQueueDto(issue.getKey(), ID_TYPE_ISSUE_KEY, issue.getProjectUuid()))
      // a mutable ListMultimap is needed for doIndexIssueItems, so MoreCollectors.index() is
      // not used
      .forEach(i -> itemsByIssueKey.put(i.getDocId(), i));
    dbClient.esQueueDao().insert(dbSession, itemsByIssueKey.values());

    dbSession.commit();

    doIndexIssueItems(dbSession, itemsByIssueKey);
  }
1323067
public function issue()
    {
        $url = $this->getEntityUrl() . $this->id . '/issue';

        return $this->request(Requests::POST, $url);
    }
1155053
public function watching(string $issue)
    {
        return new Watching($this->getHttpClient(), $this->username, $this->repo, $issue);
    }
606207
@Override
  public void store(Issue issue) {
    if (issue.primaryLocation().inputComponent() instanceof DefaultInputFile) {
      DefaultInputFile defaultInputFile = (DefaultInputFile) issue.primaryLocation().inputComponent();
      if (shouldSkipStorage(defaultInputFile)) {
        return;
      }
      defaultInputFile.setPublished(true);
    }
    moduleIssues.initAndAddIssue(issue);
  }
922727
public function create($projectKey, $issueTypeName)
    {
        $fieldsMetadata = $this->getCreateMetadataFields($projectKey, $issueTypeName);

        $fluentIssueCreate = new FluentIssueCreate($this->client, $fieldsMetadata);

        return $fluentIssueCreate->field(Field::PROJECT, $projectKey)
                        ->field(Field::ISSUE_TYPE, $issueTypeName);
    }
1335166
public function context(ContextInterface $context)
    {
        if (!empty($this->vary)) {
            $this->varyValue = $context->get($this->vary);
        }
    }
874716
def add_issue_type(self, name, **attrs):
        
        return IssueTypes(self.requester).create(self.id, name, **attrs)