Skip to content
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

Jira connector does not support self-hosted jira hosted under sub path #1468

Open
steve192 opened this issue May 15, 2024 · 0 comments
Open

Comments

@steve192
Copy link

steve192 commented May 15, 2024

When jira is hosted under https://sub.domain.com/jira, danswer tries to call the jira api with https://sub.domain.com/rest/api instead of https://sub.domain.com/jira/rest/api

05/15/2024 01:07:10 PM      run_indexing.py 356 : [Attempt ID: 78] Running indexing attempt for connector: 'JiraConnector-https://sub.domain/jira/projects/PID', with config: '{'jira_project_url': 'https://sub.domain/jira/projects/PID', 'comment_email_blacklist': []}', and with credentials: '1'
05/15/2024 01:07:10 PM      run_indexing.py  71 : [Attempt ID: 78] Unable to instantiate connector due to JiraError HTTP 404 url: https://sub.domain.com/rest/api/2/serverInfo

This is due to the assumption that the jira base url is just the "netloc"
https://github.com/danswer-ai/danswer/blob/main/backend/danswer/connectors/danswer_jira/connector.py#L32

There should be logic similar to the confluence connector where the path is analysed to determine the base url
https://github.com/danswer-ai/danswer/blob/main/backend/danswer/connectors/confluence/connector.py#L68

This could be done using "projects" as an indicator for the start of the actual jira url (e.g. in https://sub.domain/jira/projects/PID/xxxx)

PROJECT = "/project/"
jira_base = (
  parsed_url.scheme
  + "://"
  + parsed_url.netloc
  + parsed_url.path.split(PROJECT)[0]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant