com.atlassian.jira.rest.client.api.domain.Version.isArchived()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(107)

本文整理了Java中com.atlassian.jira.rest.client.api.domain.Version.isArchived()方法的一些代码示例,展示了Version.isArchived()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.isArchived()方法的具体详情如下:
包路径:com.atlassian.jira.rest.client.api.domain.Version
类名称:Version
方法名:isArchived

Version.isArchived介绍

暂无

代码示例

代码示例来源:origin: jenkinsci/jira-plugin

private boolean match(Version version) {
  // Match regex if it exists
  if (pattern != null) {
    if (!pattern.matcher(version.getName()).matches()) return false;
  }
  // Filter released versions
  if (!showReleased && version.isReleased()) return false;
  // Filter archived versions
  if (!showArchived && version.isArchived()) return false;
  return true;
}

代码示例来源:origin: jenkinsci/jira-plugin

public void releaseVersion(String projectKey, Version version) {
  final URIBuilder builder = new URIBuilder(uri)
    .setPath(String.format("%s/version/%s", baseApiPath, version.getId()));
  final VersionInput versionInput = new VersionInput(projectKey, version.getName(), version.getDescription(), version
    .getReleaseDate(), version.isArchived(), version.isReleased());
  try {
    jiraRestClient.getVersionRestClient().updateVersion(builder.build(), versionInput).get(timeout, TimeUnit.SECONDS);
  }catch (Exception e) {
    LOGGER.log(WARNING, "jira rest client release version error. cause: " + e.getMessage(), e);
  }
}

代码示例来源:origin: jenkinsci/jira-plugin

/**
 * Release a given version.
 *
 * @param projectKey  The Project Key
 * @param versionName The name of the version
 */
protected void releaseVersion(String projectKey, String versionName, JiraSession session) {
  if (session == null) {
    LOGGER.warning("JIRA session could not be established");
    return;
  }
  List<Version> versions = session.getVersions(projectKey);
  java.util.Optional<Version> matchingVersion = versions.stream()
      .filter(version -> version.getName().equals(versionName))
      .findFirst();
  if (matchingVersion.isPresent()) {
    Version version = matchingVersion.get();
    Version releaseVersion = new Version(version.getSelf(), version.getId(), version.getName(),
        version.getDescription(), version.isArchived(), true, new DateTime());
    session.releaseVersion(projectKey, releaseVersion);
  }
}

代码示例来源:origin: com.atlassian.jira/jira-rest-java-client-api

public VersionInputBuilder(String projectKey, Version version) {
  this(projectKey);
  this.name = version.getName();
  this.description = version.getDescription();
  this.archived = version.isArchived();
  this.released = version.isReleased();
  this.releaseDate = version.getReleaseDate();
}

代码示例来源:origin: com.atlassian.jira/jira-rest-java-android-client-api

public VersionInputBuilder(String projectKey, Version version) {
  this(projectKey);
  this.name = version.getName();
  this.description = version.getDescription();
  this.archived = version.isArchived();
  this.released = version.isReleased();
  this.releaseDate = version.getReleaseDate();
}

代码示例来源:origin: jenkinsci/jira-plugin

public JiraVersion(Version version) {
  this(version.getName(), version.getReleaseDate() == null ? null : version.getReleaseDate().toGregorianCalendar(), version.isReleased(), version.isArchived());
}

相关文章