Skip to content

Support for searching issues when creating them - Search and link existing issues with error or session comments.#7719

Merged
SpennyNDaJets merged 16 commits intohighlight:mainfrom
jemiluv8:link-integration-issues
Feb 29, 2024
Merged

Support for searching issues when creating them - Search and link existing issues with error or session comments.#7719
SpennyNDaJets merged 16 commits intohighlight:mainfrom
jemiluv8:link-integration-issues

Conversation

@jemiluv8
Copy link
Copy Markdown
Contributor

@jemiluv8 jemiluv8 commented Feb 12, 2024

Fixes #4460
/claim #4460

Summary

Introduce 'Link Issue' mode when creating issue for an error or session comment.
All issue integrations are supported except ClickUp. According to this and api documentation, they do not support searching issues via their rest api.

UI

On UI this just means another radio button to determine whether the user prefers to create a new issue
or link an existing one. A search-select is provided for the user to search and choose an existing issue from their
selected issue integration.
Screenshot 2024-02-27 at 9 42 28 AM
Screenshot 2024-02-27 at 9 42 48 AM

DEMO

Screen.Recording.2024-02-27.at.11.50.48.AM.mov

Backend

We needed a way to create attachment for existing issue and to search issues based on integration and a
search term/query. A sample mutation is below

createErrorCommentForExistingIssue(
	project_id: ID!
	error_group_secure_id: String!
	text: String!
	text_for_email: String!
	tagged_admins: [SanitizedAdminInput]!
	tagged_slack_users: [SanitizedSlackChannelInput]!
	error_url: String!
	author_name: String!
	issue_url: String!
	issue_title: String!
	issue_id: String!
	integrations: [IntegrationType]!
): ErrorComment

Our search query also looks like this

search_issues(
	integration_type: IntegrationType!
	project_id: ID!
	query: String!
): [IssuesSearchResult!]!

Introduce a toggle to allow searching and selecting of existing issues to be "attached" to
error or session comments.

WIP

  • Support remaining issue integrations - Github, Height,
  • Discuss clickup exception - there is currently no available rest api to search clickup tasks
  • Support session comment issue linking
  • Improve Jira search results
  • Fix select search UI glitch
  • Complete self-review and e2e click-testing

How did you test this change?

  • Go to an error and start creating an issue for the error for any of the issue integrations
  • Verify that you can now see to Radio options to 'Create Issue' or 'Link Issue'
  • Verify that when the 'Link Issue' button is clicked the form changes to enable you to search for and select an existing issue to be linked with the error or session comment

Are there any deployment considerations?

No. Our current issue integrations have the relevant permissions.

It might be time to consider "documenting" the required permissions for every
integration however.

Does this work require review from our design team?

Yes. @julian-highlight checkout the screenshots above and comment.
The goal is to support

  • selecting whether the user wants to link an existing issue or create a new one
  • searching for and linking an existing issue.

…"issue" integrations.

My approach thus far involves giving the user an option to choose between creating a new issue or linking an existing issue. This will modify the form and let the user search for and select existing issue to be linked.

support the following issue integrations for linking issues
- gitlab
- jira
- linear

Jira's current way of handling text search has left me somewhat baffled. I have two options

1. Convert a query string to a valid JQL query that will effectively do full text search on issues OR

2. Use the raw query against the jira api with the query param.

Neither approaches has thus far yielded the intended result result.
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 12, 2024

⚠️ No Changeset found

Latest commit: 7966f87

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package or glob expression "@highlight-run/rrdom" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "@highlight-run/rrdom-nodejs" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "@highlight-run/rrweb" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "@highlight-run/rrweb-player" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "@highlight-run/rrweb-snapshot" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "@highlight-run/rrweb-types" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "@highlight-run/rrweb-web-extension" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.
The package or glob expression "rrvideo" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.

@jemiluv8 jemiluv8 marked this pull request as ready for review February 27, 2024 11:12
@Vadman97 Vadman97 requested review from a team and SpennyNDaJets and removed request for a team February 27, 2024 22:29
- introduce select search component for issues search
- use new component in NewIssueModal and NewCommentForm
- fix ux for loading
- complete final e2e click-testing
Copy link
Copy Markdown
Contributor

@SpennyNDaJets SpennyNDaJets left a comment

Choose a reason for hiding this comment

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

Code is looking good! Only thing I see blocking are the consistency with ! and want to make sure we don't trip ourselves up with the double usage of the style prop in the Radio Group

@jemiluv8
Copy link
Copy Markdown
Contributor Author

I've attended to the issues from code review.
Looking forward to knowing how the click-testing went.

Copy link
Copy Markdown
Contributor

@SpennyNDaJets SpennyNDaJets left a comment

Choose a reason for hiding this comment

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

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for searching issues when creating them

2 participants