Skip to content

Linking issue to JIRA server failing #53013

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dachakra opened this issue Jul 17, 2023 · 23 comments · Fixed by #55729
Closed

Linking issue to JIRA server failing #53013

dachakra opened this issue Jul 17, 2023 · 23 comments · Fixed by #55729

Comments

@dachakra
Copy link

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

This only happens with certain projects. The Jira integration is definitely working since many work fine and can create issues.
I noticed that some of the Jira projects in the configuration section were blank. This led me to believe that some of the projects may have been removed or Sentry no longer had access to them, so I ensured that the required projects had access by re-requesting access for the service account used to access those projects, and I deleted the blank entries. However this did not fix the problem.
I then tried linking to an existing Jira ticket and this worked fine. This leads me to believe that the cached last used project might be the problem. The Sentry Issue pulls the last project used and fails because it no longer exists

Expected Result

Linking issue to Jira ticket.

Actual Result

image

This bug was reported a while ago in this issue https://sentry.sentry.io/issues/4130565830/?project=1 and a more recent event can be seen in this issue: https://sentry.sentry.io/issues/4267026714/events/e6c5ccc91a694b45824d96d56ee260c0/?project=1

Product Area

Issues

Link

No response

DSN

No response

Version

No response

@getsantry
Copy link
Contributor

getsantry bot commented Jul 17, 2023

Assigning to @getsentry/support for routing ⏲️

@getsantry
Copy link
Contributor

getsantry bot commented Jul 17, 2023

Routing to @getsentry/product-owners-settings-integrations for triage ⏲️

@getsantry getsantry bot moved this from Waiting for: Support to Waiting for: Product Owner in GitHub Issues with 👀 Jul 17, 2023
@armenzg
Copy link
Member

armenzg commented Jul 18, 2023

@dachakra FYI If you need to share any private data, there's a Private Data field for our board.

This is the code I believe is related:

project_id = params.get("project", defaults.get("project"))
jira_projects = self.get_projects()
if not project_id:
project_id = jira_projects[0]["id"]
client = self.get_client()
issue_type_choices = client.get_issue_types(project_id)

@armenzg
Copy link
Member

armenzg commented Jul 20, 2023

@dachakra could you please paste a link to a customer's issue where this happens?
(Under "Private Data" and let us know when you do)

The event you point me to shows a 400 error, could you please confirm that the jira_project_id is correct?
https://<jira_deployment>/rest/api/2/issue/createmeta/<jira_project_id>/issuetypes

If you can't get me a URL to an issue where this happens, could you please get me the API payload and response? (You can use private data if PII is contained)
In my case this is what I hit the Sentry API with:

{components: ""
description: "Sentry Issue: [SENTRY-10QN|https://sentry.sentry REDACTED"
issuetype: "10004"
priority: "4"
project: "10374"
reporter: "REDACTED"
title: "Test ticket feel free to delete"

Can you please confirm that they're using this prompt to create the Jira links?
image

I do not know how the UI would not send the project ID if they selected it.
The code would fall back to the first project if no value is passed:

        jira_projects = self.get_projects()

        if not project_id:
            project_id = jira_projects[0]["id"]

@dachakra
Copy link
Author

I created a shadow JIRA ticket here that contains the details: https://getsentry.atlassian.net/browse/ISSUE-1673

@getsantry getsantry bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 Jul 21, 2023
@riot-sschott
Copy link

Hey, I was just wondering if there was any update on this issue?

ceorourke added a commit that referenced this issue Sep 6, 2023
…le (#55729)

We're seeing an
[ApiError](https://sentry.sentry.io/issues/4267026714/events/94d0399b3d3d438d92886c0e9c9a12cc/?project=1)
when the saved default project is no longer available, so this first
checks if the default project is in all projects and if not, selects one
that is available.

Fixes SENTRY-12JS
Fixes #53013 (hopefully)
EricHasegawa pushed a commit that referenced this issue Sep 6, 2023
…le (#55729)

We're seeing an
[ApiError](https://sentry.sentry.io/issues/4267026714/events/94d0399b3d3d438d92886c0e9c9a12cc/?project=1)
when the saved default project is no longer available, so this first
checks if the default project is in all projects and if not, selects one
that is available.

Fixes SENTRY-12JS
Fixes #53013 (hopefully)
@armenzg
Copy link
Member

armenzg commented Sep 7, 2023

Hi @riot-sschott , a fix was deployed last night. Is this now working for you?

@riot-sschott
Copy link

riot-sschott commented Sep 7, 2023 via email

@ceorourke
Copy link
Member

@lobsterkatie I have not, I have been trying when it pops up when I'm on triage rotation, and Steve tried a couple times too with no luck.

@dachakra
Copy link
Author

dachakra commented Dec 8, 2023

Hey @riot-sschott, is your team integrating Sentry to Atlassian Data Center via the Jira Server integration? Or are you using Jira Server and experiencing this issue? CC @brianthi

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 Dec 8, 2023
@getsantry getsantry bot removed the status in GitHub Issues with 👀 Dec 8, 2023
@getsantry getsantry bot moved this to Waiting for: Community in GitHub Issues with 👀 Dec 8, 2023
@riot-sschott
Copy link

riot-sschott commented Dec 10, 2023 via email

@getsantry getsantry bot moved this from Waiting for: Community to Waiting for: Product Owner in GitHub Issues with 👀 Dec 10, 2023
@rachrwang
Copy link

@riot-sschott - do you plan on making any changes to your integration based on Atlassian stopping support for Server products? https://www.atlassian.com/migration/assess/journey-to-cloud

@riot-sschott
Copy link

riot-sschott commented Dec 11, 2023 via email

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 Dec 11, 2023
@rachrwang
Copy link

@riot-sschott - that would be great, since we've had a difficult time reproducing this problem on our side with multiple devs looking into it, and we haven't seen any of the problems reported for our cloud integration. Thank you for the quick follow-up!

@riot-sschott
Copy link

@rachrwang We have completed the migration and are no longer experiencing the issue. Thanks for your assistance.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 2 Jan 10, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jan 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Archived in project
Development

Successfully merging a pull request may close this issue.