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 Server: persist search query #5820

Closed
4 tasks
Dschoordsch opened this issue Dec 21, 2021 · 6 comments · Fixed by #6551
Closed
4 tasks

Jira Server: persist search query #5820

Dschoordsch opened this issue Dec 21, 2021 · 6 comments · Fixed by #6551
Assignees
Labels

Comments

@Dschoordsch
Copy link
Contributor

Dschoordsch commented Dec 21, 2021

Functionally similar to persistJiraSearchQuery and persistGitHubSearchQuery.

Acceptance criteria

  • add generic table to persist integration specific settings (see Integration task architecture spec'd #5968)
  • add mutation persistIntegrationSearchQuery and add logic for Jira Server
  • add logic to UI and TaskIntegration so it is used
  • create ticket to migrate persistJiraSearchQuery and persistGitHubSearchQuery over
@jordanh jordanh changed the title Jira Server persist search query Jira Server: persist search query Dec 28, 2021
@jordanh jordanh added this to the Jira Server milestone Dec 28, 2021
@jordanh jordanh moved this to To Prioritize in Sprint Board Beta Dec 28, 2021
@jordanh jordanh moved this from To Prioritize to Backlog in Sprint Board Beta Dec 28, 2021
@jordanh jordanh added the Story Points: 13 Generated by Parabol label Feb 8, 2022
@jordanh
Copy link
Contributor

jordanh commented Feb 8, 2022

Include in next sprint?: N
See the discussion in Planning for Sprint #​​96

Powered by Parabol

@Dschoordsch
Copy link
Contributor Author

Story points: 13
See the discussion in Sprint Poker #​​1

Powered by Parabol

@Dschoordsch
Copy link
Contributor Author

Include in next sprint?: Y
See the discussion in Sprint Poker #​​1

Powered by Parabol

@Dschoordsch Dschoordsch moved this from Backlog to Todo in Sprint Board Beta Apr 5, 2022
@Dschoordsch Dschoordsch added the Next Sprint: Y Generated by Parabol label Apr 5, 2022
@igorlesnenko igorlesnenko self-assigned this Apr 19, 2022
@igorlesnenko igorlesnenko moved this from Todo to In Progress in Sprint Board Beta Apr 19, 2022
@igorlesnenko
Copy link
Contributor

@Dschoordsch Our search queries have different format for different integrations, and may get even more differences in the future if we want to persist more filters.

For example, for JiraServer we persist the following information:

queryString
isJQL
projectKeyFilters

For GitHub it is only:

queryString

if we want a generic mutation persistIntegrationSearchQuery we probably need to submit the whole query as single JSON field and read an array of JSON on the UI

teamMember {
  integrations {
    atlassian {
      searchQueries
    }
  }

This way we can probably also implement generic logic on the UI.

Does that sound okay to you?

@igorlesnenko
Copy link
Contributor

I also suggest to use a separate table IntegrationSearchQuery

id 
service
query: jsonb
lastUsedAt

As currently, we load all the queries and manually check uniqueness, do sorting, slicing array etc.
This all could be done with a single insert on conflict update

@Dschoordsch
Copy link
Contributor Author

@igorlesnenko I like the idea of leaving the conflict resolution up to the database. What I would maybe add is a providerId so if a user for whatever reason changes from one hosted Jira Server to a different one, it will not reuse the old search queries.

I'm not 100% certain anymore whether we should have integration specific tables or one generic one. I personally dream of a generic one because in the ideal case for a new integration you would only need to implement the TaskIntegrationManager and adapt the UI.

On the other hand we could achieve this also by having integration specific tables and treat these as being owned by the integration, i.e. only the integration manager itself reads and writes to it.

@igorlesnenko igorlesnenko moved this from Reviewer Review to Maintainer Review in Sprint Board Beta May 30, 2022
Repository owner moved this from Maintainer Review to Done in Sprint Board Beta May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
3 participants