Hey,
I try to add a Link to create JIRA issues in Confluence with REST.
Of course, I had to add CORS to the JIRA Apache configuration and the creation works nicely.
But the users have to write their password in a field for the authentication, although their Confluence Login is same to the JIRA Login.
Is there a way to use the Confluence authentication?
There is a firefox addon "Poster" where I can create issues with REST without giving the authentication credentials directly if I am logged in JIRA. Is there a way to transfer this behavior to my script?
Community moderators have prevented the ability to post new answers.
Any particular reason, why you don't use Application Links to connect JIRA with Confluence?
I connected both. But I can't use an issue collector, because I need to create several issues with labels out of Confluence. I tried to use this too: {code} http://wiki.XXXXXX.com/plugins/servlet/applinks/proxy?appId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&path=http://jira.XXXXXX.com/rest/api/2/issue{code} But there are problems with POST requests. GET works fine, but the committed parameters of POST weren't correct. I always get an HTTP 400 Bad request.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you also try http://wiki.XXXXXX.com/rest/jira-integration/1.0/issues?applicationId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx {"issues":[{"fields":{"project":{"id":"xxxxx"},"issuetype":{"id":"x"},"summary":"test","description":"text"}}]}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Many thanks! This works. Can you tell me, where you found this REST path?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure, I copied it from Firebug while creating a new JIRA issue in the editor via the JIRA Issues Macro (https://confluence.atlassian.com/doc/jira-issues-macro-139380.html)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But is there a way to make it work in the first format? The one with /jira-integration/ is giving me HTTP 500
For me the 'GET' calls are working as you described:
$.ajax({
url: '<CONFLUENCE URL>/plugins/servlet/applinks/proxy?appId=<APP_ID>&path=<JIRA_URL_ENCODED>%2Frest%2Fapi%2F2%2Fissue%2FISSUE-123',
type: 'get',
contentType: 'application/json',
success: function (resp) { },
});
but the 'POST' requests always fail with HTTP 400 Bad request: "The request sent by the client was syntactically incorrect"
var jiraData = {"fields": {"project": { "key": "PRJ" },"summary": "dummy","description": "test","issuetype": { "name": "Task" }}}
$.ajax({
url: '<CONFLUENCE URL>/plugins/servlet/applinks/proxy?appId=<APP_ID>&path=<JIRA_URL_ENCODED>%2Frest%2Fapi%2F2%2Fissue',
type: 'post',
contentType: 'application/json',
data: JSON.stringify( jiraData ),
success: function (resp) { },
});
I am thinking that the JSON should be formatted/escaped somehow.. any clue?
I use: JIRA v7.2.7, Confluence 6.4.3
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So your purpose was to automate creation of a group of sub-tasks w/ a parent, and Confluence is more like your input template. Interesting.
We're using a Confluence template as a form to hold project descriptions with definitions, authorizations, validation, etc. Almost all text. But we associate a JIRA epic with each for status tracking & task assignment.
You've managed to create issues on saving a page using the blueprint- That sounds great & I'd love to know what you did. Are you creating the issues with javascript? I don't know what logic you can embed in a blueprint yet.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I made several blueprints and they are a mix of Javascript and Java. The creation of the issues directly is done in Java. I use the onBlueprintCreateEvent for doing this. So several information of the page and an earlier Wizard can inserted in the issue. The JIRA information and creation is done with the JIRA REST API. Because the pages contains a link to the created issue, it was necessary to pre- and post-renderer coded with javascript. JIRA and Confluence are a powerful bundle to work with.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Robin,
I have been creating issues with POST also without a problem, but couldn't manage to DELETE or MODIFY issues. Have you done this through confluence?
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@cepedanicolasN were u able to find the route to DELETE or MODIFY an existing issue using rest/jira-integration/1.0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Robin Peters, would you mind elaborating on what you've done with this? I'm working on automatically creating an associated JIRA epic per Confluence page. Is that what you're doing here?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, I created a HTML Page inserted with the HTML Macro. There you can add rows to a table and can fill the cells with data (input-fields). You can press a button and every row will created as a JIRA Sub-Task. A small summary over the whole table will be created as the parent-task. I made blueprints which will create JIRA issues if you save a page using this blueprint. Is this what you want to do?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.