Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to create Jira tickets from within Confluence (both server) using REST API

Frank Rentef
Contributor
September 9, 2020

Trying to create Jira tickets from within Confluence (bother server).  Looking for literal baby steps on "How To".  Everything I've found so far is written for mid level to advanced users.

 

Help Appreciated!

 

THNX

 

2 answers

0 votes
Frank Rentef
Contributor
September 10, 2020

Thank you for your response.  My question should have been more specific.

I am familiar with that method. 

The powers "at be" in this environment insist on using Jira REST API.  To quote, "we do not want to see any evidence of Jira"... "All done through Confluence....".

Why, I not know.  Not logical in my mind....have the tools, use them... but I digress.

I'm a middle weight with Jira/Confluence but as of yet unexposed to the REST API method.

Any help is appreciated.

 

THNX

Mikael Sandberg
Community Champion
September 10, 2020

Okay, then take a look at this one using direct HTML links to create Jira issues in Confluence. And here is a link to some REST API examples for creating issues, Performing issue operations. You may also want to check out the Atlassian Developer Community

Another option would be to to use the Issue collector, here is an old post about embedding it in Confluence. 

Frank Rentef
Contributor
September 10, 2020

Thank you sir!  Off to do some reading.

Frank Rentef
Contributor
September 15, 2020

Has anyone a basic working example of the following?  https://wiki.vertuna.com/display/CONFIFORMS/Creating+Jira+issue+from+Confluence+with+ConfiForms

I've keyed, copied and read triple times and cannot make this simple example work.

My problem seems to be the JASON code needed for the IFTTT section.

THNX

Alex Medved _ConfiForms_
Community Champion
September 15, 2020

What error do you get when attept to create a Jira issue from ConfiForms?

Frank Rentef
Contributor
September 17, 2020

Thank you for your time.  I've successfully created the Jira ticket using Confiforms from within Confluence using the Summary and Description fields making issue type = Story.  

I've tried expanding to other fields, in this case "Assignee" and I'm getting the following error message

"com.atlassian.sal.api.net.ResponseException: Error communicating with Jira, {"errorMessages":[],"errors":{"assignee":"data was not an object"}}".  

I know 100% the user I'm trying to assign the ticket (myself) is allowed.

Using Form Field Definition Field Type "Dynamic Drop down (auto suggest) which does appear to be interfacing correctly.

{ "fields": { "project": { "key": "DSAG" }, "summary": "[entry.summary]", "description": "[entry.description]", "assignee": "[entry.assignee]", "issuetype": { "name": "Story" } } }

 

THNX

Alex Medved _ConfiForms_
Community Champion
September 18, 2020

Is this for Jira cloud? This error often means that assignee needs to be in another format... using "id" attribute

"assignee": {
"id": "[entry.assignee]"
}

If it is for Jira server then I believe the mapping is something like

"assignee": {
"name": "[entry.assignee]"
}

Also, very often Jira is set up so that you cannot set the assignee yourself via API (it is restricted). Please verify that you actually can 

Frank Rentef
Contributor
September 23, 2020

This is Jira Server.

0 votes
Mikael Sandberg
Community Champion
September 9, 2020

To create a new Jira issue from within Confluence do the following:

  1. Select Edit to open up the page editor
  2. In the editor, select Insert (or +) > Jira
  3. Choose Create New Issue
  4. Select the Jira project, the issue type and enter a summary and a description, and once done click Insert to create the issue.

You can also create an issue by highlighting some text on the page and select Create Issue that will be shown over the highlighted text.

See Use Jira applications and Confluence together for more information. Note that you (or your admin) have to set up the application links between Confluence and Jira for this to work.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events