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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,448
Community Members
 
Community Events
176
Community Groups

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

Atlassian Community Events