Tabnine Logo
IssueRestClient.createIssue
Code IndexAdd Tabnine to your IDE (free)

How to use
createIssue
method
in
com.atlassian.jira.rest.client.api.IssueRestClient

Best Java code snippets using com.atlassian.jira.rest.client.api.IssueRestClient.createIssue (Showing top 4 results out of 315)

origin: jenkinsci/jira-plugin

public BasicIssue createIssue(String projectKey, String description, String assignee, Iterable<String> components, String summary,
               @Nonnull Long issueTypeId, @Nullable Long priorityId) {
  IssueInputBuilder builder = new IssueInputBuilder();
  builder.setProjectKey(projectKey)
      .setDescription(description)
      .setIssueTypeId(issueTypeId)
      .setSummary(summary);
  if (priorityId != null) {
    builder.setPriorityId(priorityId);
  }
  if (!assignee.equals(""))
    builder.setAssigneeName(assignee);
  if (Iterators.size(components.iterator()) > 0){
    builder.setComponentsNames(components);
  }
  final IssueInput issueInput = builder.build();
  try {
    return jiraRestClient.getIssueClient().createIssue(issueInput).get(timeout, TimeUnit.SECONDS);
  } catch (Exception e) {
    LOGGER.log(WARNING, "JIRA REST createIssue error: " + e.getMessage(), e);
    return null;
  }
}
origin: stackoverflow.com

JiraRestClient restClient;
 public boolean createIssue(IssueJiraDTO issueDTO) throws IOException{
     final IssueInputBuilder builder = new IssueInputBuilder(PROJECT_KEY, issueDTO.getIssueType(), issueDTO.getSummary());
     final ComponentRestClient componentClient = restClient.getComponentClient();
     try {
       openClient();
       //completamos los datos
       Component component = componentClient.getComponent(new URI(issueDTO.getComponent())).claim();
       builder.setComponents(component);
       builder.setFieldValue(CODCESCEFIELDID, issueDTO.getCodcesce());
       builder.setFieldValue(LINKCAFIELD, issueDTO.getLinkCA().trim());
       builder.setFieldValue(SECURITYFIELD, ComplexIssueInputFieldValue.with("id",  issueDTO.getSecurityLevel()));
       builder.setPriorityId(issueDTO.getPriority());
       builder.setDescription(issueDTO.getDescription());
       final IssueInput input = builder.build();
       // create issue
       final IssueRestClient client = restClient.getIssueClient();
       final BasicIssue issue = client.createIssue(input).claim();
       logger.info("Incidencia creada correctamente: "+ issue.getId());
     }catch(Exception e){
       logger.error("Error al crear la Issue en Jira: " + issueDTO.getCodcesce(), e);
     } finally {
       closeClient();
     }
     return true;
   }
origin: OpenNMS/opennms

  createdIssue = jira.getIssueClient().createIssue(builder.build()).get();
} catch (InterruptedException | ExecutionException e) {
  throw new PluginException("Failed to create issue.", e);
origin: org.opennms.features/jira-troubleticketer

  createdIssue = jira.getIssueClient().createIssue(builder.build()).get();
} catch (InterruptedException | ExecutionException e) {
  throw new PluginException("Failed to create issue.", e);
com.atlassian.jira.rest.client.apiIssueRestClientcreateIssue

Javadoc

Creates new issue.

Popular methods of IssueRestClient

  • getIssue
    Retrieves issue with selected issue key, with specified additional expandos.
  • getTransitions
    Retrieves complete information (if the caller has permission) about transitions available for the se
  • transition
    Performs selected transition on selected issue.
  • addComment
    Adds a comment to JIRA (adding it to selected issue)
  • updateIssue
    Update an existing issue.
  • getCreateIssueMetadata
    Retrieves CreateIssueMetadata with specified filters.
  • linkIssue
    Creates link between two issues and adds a comment (optional) to the source issues.

Popular in Java

  • Reactive rest calls using spring rest template
  • setRequestProperty (URLConnection)
  • onCreateOptionsMenu (Activity)
  • getResourceAsStream (ClassLoader)
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now