• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kobotoolbox / kpi / 12299223195 / 1
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: beccagraber/dev-1453-run-external-process
DEFAULT BRANCH: master
Ran 12 Dec 2024 03:46PM UTC
Files 608
Run time 17s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Dec 2024 03:10PM UTC coverage: 80.388% (-0.007%) from 80.395%
12299223195.1

push

github

web-flow
fix(organizations): limit useOrganizationQuery refetches TASK-1347 (#5346)

### 🗒️ Checklist

1. [x] run linter locally
2. [x] update all related docs (API, README, inline, etc.), if any
3. [x] draft PR with a title `<type>(<scope>)<!>: <title> TASK-1234`
4. [x] tag PR: at least `frontend` or `backend` unless it's global
5. [x] fill in the template below and delete template comments
6. [x] review thyself: read the diff and repro the preview as written
7. [x] open PR & confirm that CI passes
8. [x] request reviewers, if needed
9. [x] delete this section before merging

### 📣 Summary
Avoid unnecessary fetches of organization data


### 📖 Description
After patching changes to organization members react-query was making
two (sometimes one) refetches of backend data for
`useOrganizationQuery`. This was undesired behavior. We want the
organization members list to be refetched, but not the organization
detail itself. To resolve this, I have set the `staleTime` option on
`useOrganizationQuery` to 2 minutes. Since the data will not be
considered stale until 2 minutes passes since the last refresh, these
unnecessary API calls will not be made. Additionally, we have added an
optional param to the Organization query to invalidate cached data on
mount. This is used by the settings page. Since this page is intended
for editing organization data, I think it is preferable to always fetch
the latest data when opening it.


### 👀 Preview steps
1. Sign in as an MMO admin or owner for an org with a few members
2. On the organization members table, change the role of one of the
other members
3. On main, observe the organization data being fetched after a
successful member patch request
4. On this branch, observe no org data fetch
5. On this branch, navigate to the Organization settings page and see
that the organization data is refetched.

### 💭 Notes
I set a very low stale time for the organization. There had been some
discussio... (continued)

5748 of 9231 branches covered (62.27%)

21986 of 27350 relevant lines covered (80.39%)

0.8 hits per line

Source Files on job 12299223195.1
  • Tree
  • List 608
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 12299223195
  • f57d31b4 on github
  • Prev Job for on main (#12298878353.1)
  • Next Job for on main (#12315307717.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc