Skip to content

impr(jira): switch to paginated project endpoint for jira issue config #89707

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

Merged
merged 12 commits into from
Apr 18, 2025

Conversation

Christinarlong
Copy link
Contributor

@Christinarlong Christinarlong commented Apr 15, 2025

Relies on FF: #89709
Addresses: TRI-123

For getting the Jira issue config, switch to using the paginated endpoint for getting projects. O also added a QOL so we'll display the label with both the Jira project key and project name. Docs for Jira search/paginated projects endpoint

Flow:

  1. Get and display the first 10 projects from Jira
  2. If it's a different project they can search for it

Initial load (max 10 projects)
image

Search load
image

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 15, 2025
Copy link

codecov bot commented Apr 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #89707       +/-   ##
===========================================
+ Coverage   42.11%   87.68%   +45.56%     
===========================================
  Files       10216    10213        -3     
  Lines      575535   576222      +687     
  Branches    22719    22685       -34     
===========================================
+ Hits       242400   505272   +262872     
+ Misses     332692    70516   -262176     
+ Partials      443      434        -9     

@Christinarlong Christinarlong marked this pull request as ready for review April 16, 2025 16:23
@Christinarlong Christinarlong requested review from a team as code owners April 16, 2025 16:23
Copy link
Member

@leeandher leeandher left a comment

Choose a reason for hiding this comment

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

🔥 love the inclusion of the project title, and ✅ tests are great too! just a few comments and questions

Copy link
Member

@leeandher leeandher left a comment

Choose a reason for hiding this comment

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

One small comment, great work 🚀

Copy link
Member

@leeandher leeandher left a comment

Choose a reason for hiding this comment

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

thought i approved mb

Copy link
Member

@GabeVillalobos GabeVillalobos left a comment

Choose a reason for hiding this comment

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

Nice work on this!

Comment on lines +831 to +839
projects_form_field = {
"name": "project",
"label": "Jira Project",
"choices": [(p["id"], f"{p["key"]} - {p["name"]}") for p in jira_projects],
"default": meta["id"],
"type": "select",
"updatesForm": True,
"required": True,
}
Copy link
Member

Choose a reason for hiding this comment

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

Part of the "leaving code better than we found it" mantra, it'd be nice if we could create a typeddict or dataclass for this in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

do you mind if I pull out the FormField typing to another PR ? It's going to add a lot of changes unrelated to the original PRs goal.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

moving formfield typing to another PR

@Christinarlong Christinarlong merged commit 515d2a1 into master Apr 18, 2025
64 checks passed
@Christinarlong Christinarlong deleted the crl/jira-paginated-project branch April 18, 2025 18:19
Copy link

sentry-io bot commented Apr 18, 2025

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ AttributeError: 'NoneType' object has no attribute 'organization' /api/0/organizations/{organization_id_or_slug}/... View Issue

Did you find this useful? React with a 👍 or 👎

@Christinarlong Christinarlong added the Trigger: Revert Add to a merged PR to revert it (skips CI) label Apr 18, 2025
@getsentry-bot
Copy link
Contributor

PR reverted: 13efe59

getsentry-bot added a commit that referenced this pull request Apr 18, 2025
…ue config (#89707)"

This reverts commit 515d2a1.

Co-authored-by: Christinarlong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components Trigger: Revert Add to a merged PR to revert it (skips CI)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants