Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Create Jira issue with preassigned component using link does not work

Timo Schütz September 2, 2019

Hello,

I'm currently setting up a confluence page for our team. We have different pages for different topics and I inserted a overview of the active jira tasks for that topic. I'm currently thinking of using components to filter the issues. I tried to create a link with

https://domain.atlassian.net/secure/CreateIssue.jspa?pid=10014&issuetype=10015&components=10011

but this does not fill in the components, althought the ID is correct.

Where is the issure here?

 

Thanks for help

2 answers

4 votes
joey_klein
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 13, 2021

Solution is to change the url to ……CreateIssueDetails!init.jspa?……

Michal Šípek June 4, 2022

That's perfect! It works like a charm. Thanks.

1 vote
Stan Ry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 2, 2019

Hello Timo,

You can do that by using HTML links as described in the following article: 

Creating Issues via direct HTML links

If need be, you can add a button as an instance of the UI Button plugin  and then configure the plugin to open the URL configured by using the provided guidelines for creating HTML links. When clicking this button, your users will be present with a typical Create Issue form in Jira where all fields will be configured as filled in URL parameters.

Markup code can look as follows:

<ac:structured-macro ac:macro-id="b33e0b6c-9745-4fdc-84ac-f4ba43349df4" ac:name="ui-button" ac:schema-version="1">
<ac:parameter ac:name="color">blue</ac:parameter>
<ac:parameter ac:name="newWindow">true</ac:parameter>
<ac:parameter ac:name="size">small</ac:parameter>
<ac:parameter ac:name="icon">add</ac:parameter>
<ac:parameter ac:name="tooltip">Click here to create an issue in Jira</ac:parameter>
<ac:parameter ac:name="title">Leave some feedback</ac:parameter>
<ac:parameter ac:name="url">https://example.net/jira/secure/CreateIssueDetails!init.jspa?pid=1234&issuetype=55508&priority=4&summary=User%20Question;labels=Feedback</ac:parameter>
</ac:structured-macro>
Timo Schütz September 2, 2019

Hello Stan,

thanks for the suggestion. I've already found that, but assigning my component does not work. I updated the question above to match my link.

I got the component id from the api endpoint.

Edit: It works with CreateIssueDetails, but then I get the author bug which I cannot solve with user macros, because we are cloud hosted.

Stan Ry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 2, 2019

Timo, could you please add more on what's the author bug you've mentioned? How it looks like? We are using the approach on the server version and the above code works for me. Let's wait for the guys who have dealt with the cloud version.

Like Timo Schütz likes this
Timo Schütz September 3, 2019

Hi Stan,

I found that it seems to be an issue with my specific project. On other projects I can create an Incident without the need of adding an author (the field does not appear at all - like I want it to be because all users are logged on). On the specific project it asks me to insert an author, but as I am already logged in it should automatically insert me as the reporter.

 

2019-09-04 07_52_55-Clipboard.png

Stan Ry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 4, 2019

Hi again, Timo.

Thanks for the clarification. Have you seen this thread?

Like Timo Schütz likes this
Timo Schütz September 4, 2019

Hi Stan,
no I haven't seen this one, but their workaround to be logged in does not work for me. Also I am promted with logging in when I am not, so that did not helped much.

All users which want to use this function are already logged into confluence and I don't want that they need to select themselves as reporter again.

joey_klein
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 13, 2021

Was there any workaround for the component being defined in the url ? I’m also having this problem 

Baris Guner November 17, 2021

Hi,

This is a very late response to this problem but if the Author field mentioned by @Timo Schütz here is a custom field then its custom field id should be used in the link. 

From the doco: 

"The key and value for custom fields can be found by examining the source code. The name/key are prefixed by 'customfield_' followed by their custom field id. For example: 'customfield_10000' "

For components @joey_klein go to your Project settings -> then choose Components. Once you see a list of them right click on the component you want and Inspect it in Chrome. the ID is revealed as data-component-id tag. 

Hope that helps.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events