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 and Confluence connector features #2682

Closed
wants to merge 2 commits into from
Closed

Conversation

useruid
Copy link
Contributor

@useruid useruid commented Oct 4, 2024

Description

Jira:

  • Add include_custom_fields feature to the UI and BE also (now you checkbox custom jira columns will be indexing and put to metadata). This improves search and answer quality if you have specific and useful data in custom fields.
  • Add skip_labels to the UI while creating connector. Put this option to UI to make it configurable ez for every project.

Confluence:

  • Fix skip_labels for confluence attachments. Added logic for skipping attachments also. This is useful if some attachments are "bad", have some private info etc.
  • Add this option to the UI

How Has This Been Tested?

Tested with Jira and Confluence server. Custom fields are now indexed and exists in metadata. This improves search and answer quality. For Confluence I tried different labels to attachments, now everything is correct.

Accepted Risk

To test it with cloud version.

Related Issue(s)

[If applicable, link to the issue(s) this PR addresses]

Checklist:

  • All of the automated tests pass
  • All PR comments are addressed and marked resolved
  • If there are migrations, they have been rebased to latest main
  • If there are new dependencies, they are added to the requirements
  • If there are new environment variables, they are added to all of the deployment methods
  • If there are new APIs that don't require auth, they are added to PUBLIC_ENDPOINT_SPECS
  • Docker images build and basic functionalities work
  • Author has done a final read through of the PR right before merge

Jira:
- Add include_custom_fields feature to the UI and BE also (now you checkbox custom jira columns will be indexing and put to metadata)
- Add skip_labels to the UI while creating connector

Confluence:
- Fix skip_labels for confluence attachments
- Add this option to the UI
Copy link

vercel bot commented Oct 4, 2024

@useruid is attempting to deploy a commit to the Danswer Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR enhances the Jira and Confluence connectors with new features and fixes:

  • Added support for indexing Jira custom fields, improving search and answer quality
  • Implemented skip_labels functionality for both Jira and Confluence connectors
  • Fixed skip_labels for Confluence attachments to exclude specific attachments
  • Updated frontend configuration to include new options for custom fields and skip_labels
  • Tested with Jira and Confluence server versions, but cloud version testing is still pending

3 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings

# pages.
labels_to_skip: list[str] = CONFLUENCE_CONNECTOR_LABELS_TO_SKIP,
# pages. Added default None to backward compatibility
labels_to_skip: list[str] = None or CONFLUENCE_CONNECTOR_LABELS_TO_SKIP,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Consider using a default argument that doesn't rely on short-circuit evaluation

Comment on lines +522 to +528
if labels_to_skip:
attachment_labels = [
label["name"] for label in attachment["metadata"]["labels"]["results"]
]
label_intersection = labels_to_skip.intersection(attachment_labels)
if label_intersection and attachment_labels:
return None
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: This block could be moved to a separate method for better readability

@@ -106,6 +107,7 @@ def fetch_jira_issues_batch(
batch_size: int = INDEX_BATCH_SIZE,
comment_email_blacklist: tuple[str, ...] = (),
labels_to_skip: set[str] | None = None,
custom_fields: dict | None = None,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Consider adding type hints for the custom_fields parameter

@hagen-danswer
Copy link
Contributor

We are covering the confluence functionality with this pr here:
PR

For the jira functionality, we are being very careful about the metadata we use to enhance our search. Right now we are in the middle of looking into what that would look like for Jira specifically, but we will certainly consider using custom fields. Keep an eye out for that change sometime soon!

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

Successfully merging this pull request may close these issues.

2 participants