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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Viewing linked Jira issues in Bamboo

We are using a Bamboo script task to update linked Jira tickets.

We have tech users locally in both systems and use them to do REST calls.

Recently all automation fell down, as it was asking Bamboo tech user to log in to Jira, to be able to see linked issues.

Why that could have happened?

Is there a way to avoid this?

Is it possible to connect users using a code, not UI? 

1 answer

1 accepted

0 votes
Answer accepted

Hello @Artsiom_Tverdakhleb

Let me add some comments on your messages to make sure we are aligned.

We are using a Bamboo script task to update linked Jira tickets.

We have tech users locally in both systems and use them to do REST calls.

I assume you are using username and password for that, right?

Recently all automation fell down, as it was asking Bamboo tech user to log in to Jira, to be able to see linked issues.

What was the error you saw in Bamboo script?

Why that could have happened?

If the requests were without password, it might be the case of a permission change in Jira side for the affected user.

Is there a way to avoid this?

I'll need to make sure I understand the problem correctly first. I would start checking:

  1. How is the REST API called
  2. What is the error you see in Bamboo side
  3. What are the permissions for the user in Jira side

Is it possible to connect users using a code, not UI? 

When you say connect, are you talking about login? I guess I will need the data shared above to understand better what is happening there.

Hello @Daniel Santos,

Thank you for your reply.

 

I assume you are using username and password for that, right?

Yes, that's right. 

What was the error you saw in Bamboo script? 

That was 401, but not actually from Bamboo. You see, the REST API we were calling is: 

/result/{projectKey}-{buildKey}-{buildNumber : ([0-9]+)|(latest)}?expand=jiraIssues

So that request was actually returning 401 from Jira. As any other requests to Bamboo were returning the correct information. For example this call:

/deploy/projectVersioning/{deploymentProjectId}/variables

From the above, I decided to log in into Bamboo with tech user. In the UI on the linked issues page in the Build plan, I saw that it was asking to log in into Jira to see linked issues. So somehow Bamboo or Jira is connecting this both users.

 

Hope this information would answer your questions.

Regards, Artsiom

Now that I reproduced the issue I can tell you what possibly happened.
One of the possible causes for this was the application links recreation.

I suppose that when you (or your team) created the application link the option  "[] servers have the same set of users and usernames" was not checked. Considering the scenario where the base of users is possibly different, the Atlassian apps will use a token to identify which user is linked to which user. In other words, when I access with user A, Bamboo will use the user B (that was linked to A) to access Jira. In your case, these users have possibly the same name.

When the application links are created as described above we have to link at least one time the pair of users and this will happen when receiving a message requesting you to log in, then Allow the linking. Once that is done you don't need to redo it unless:

  • The approval was removed in one of the apps
  • Or, the application link was recreated. When this happens the users will need to be linked again.

Does that make sense to you?

Hello @Daniel Santos,

Yes, thank you a lot.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

588 views 1 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you