Forums

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

Creating Confluence page from JIRA scriptrunner establishes link under my username

Shreyance Shaw March 19, 2019

Hello,

We are to create a Confluence page from workflow post function.

We have a script which is able to do that. The script also adds a JIRA Macro on the Confluence page so that the Remote link between the issue and the Page is established.

The user which is to create a Confluence page via the script,  exists both on JIRA and Confluence (username: integration_bot)

The script is working as expected, with only one issue, the link is getting created under my name, when we see the summary of the issue on the JIRA project summary section.

The page shows proper information on Confluence 

Created by integration_bot less than a minute ago.

However, on the JIRA summary section it says

Shreyance Shaw created a link from SP-185 - User Story to Page (Confluence)

 

How do i ensure that the link is also created by integration_bot ?

 

 

1 answer

0 votes
Marc Minten _EVS_
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.
March 20, 2019

Who is Jira current user when the postscript function is executed ?

How does Jira acripts interact with confluence ? Over an application link and a REST call ?

Shreyance Shaw March 20, 2019

It was my account as the current user, even if its someone else, it still shows my name only on the link.

JIRA interacts with Confluence via a REST Call.

Marc Minten _EVS_
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.
March 21, 2019

What authentication was used in the Application link between Jira and Confluence ? 

Shreyance Shaw March 21, 2019

The application link is using OAuth 

Marc Minten _EVS_
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.
March 21, 2019

with impersonation ?

I understand well that you "see" what user created the link in Jira in the issue history. Correct ? (you talk about a "summary section" ?)

Shreyance Shaw March 21, 2019

Hi Marc,

Appreciate the prompt response.

The OAuth is NOT with impersonation. 

I see it not on the Issue History, but the project Activity section

https://<JIRA_URL>:<PORT>/projects/<PROJECT_KEY>/summary

Marc Minten _EVS_
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.
March 21, 2019

Ok. If you do not impersonation, the documentation says

  • The user is redirected to log in to the remote application, after which tokens generated on their behalf are used to authorize requests made from the local application.
  • The remote application handling the request uses the access permissions of the account with which the user logged in on that remote application.

 

I guess you have to look in that direction ?

Shreyance Shaw March 22, 2019

We changed users which is to create the Confluence page, for all of them its my name which comes for creating the remote link, but for one specific user account it works as expected, the user created the page and the link. Not sure what is happening here..

Bhupesh Nagda
Contributor
January 28, 2020

hi @Shreyance Shaw 

 

Were you able to resolve this? I am having similar issue with my JIRA-Confluence integration. Tickets are getting created from one account which has system admin privileges on both the applications and not from any other accounts :(

I would appreciate any help in this regard!

 

BR,

Bhupesh

Suggest an answer

Log in or Sign up to answer