title: Atlassian JIRA Java library attach file to task immediately upon creation
body: <p>Working with Atlassian Java API. Making 2 steps:</p>
  
  <p><strong>1. Creating issue</strong></p>
  
  <pre><code>        IssueType it = new IssueType(jiraServerUri, ticket.getTypeId(),
                  ticket.getTypeName(), false, ticket.getTypeName(), null);
          issueBuilder.setIssueType(it);
  
          IssueInput issueInput = issueBuilder.build();
  
          Promise&lt;BasicIssue&gt; reply = issueRestClient.createIssue(issueInput);
          BasicIssue issue = reply.claim();
          LOG.debug("CREATED TICKET:/" + issue.getKey() + "/" + issue + "/");
  </code></pre>
  
  <p><strong>2. Attaching files</strong></p>
  
  <pre><code>
          com.atlassian.jira.rest.client.api.domain.Issue issueWithAttachment = issueRestClient.getIssue(key).claim();
  
          if (attachments != null &amp;&amp; ! attachments.isEmpty()) {
              attachments.forEach((name, contents) -&gt; {
                  try {
                      String attUrl = issueWithAttachment.getAttachmentsUri().toString();
                      LOG.info("TEMP_ATTACH_LOG: Original attachment url: " + attUrl);
  
                      issueRestClient.addAttachment(
                              new URI(attUrl),
                                  new ByteArrayInputStream(contents.getBytes(ENCODING_DEFAULT)),
                                  name + TXT_POSTFIX_DEFAULT)
                              .claim();
                  } catch (UnsupportedEncodingException | URISyntaxException e) {
                      LOG.error("TEMP_ATTACH_LOG Error: " + e.getMessage());
                  }
              });
          }
          return key;
  
  </code></pre>
  
  <p>, where <code>key</code> is <code>issue.getKey()</code> from 1st step.</p>
  
  <p>So it works fine, but not in my case for some reasons (beyond the discussion of this issue).</p>
  
  <p>So, question is - can I do both in just one step? I mean, fill all the issue info (title, body, <strong>attachments</strong> etc) in a single step and submit it to jira server with one command (like <code>claim()</code> I suppose...). </p>