Skip to content

Commit

Permalink
fix: The Custom Fields cache is not being cleared during full-cache c…
Browse files Browse the repository at this point in the history
…lear.
  • Loading branch information
adam-coster committed Aug 21, 2021
1 parent 4821578 commit 16eed35
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ All cards come with a handful of fields by default. These fields are global (not

### Custom Fields

> ⚠ Custom Field data from the Favro API cannot be filtered by scope and does not contain scope information, unlike what you see in the Favro UI. This makes working with Custom Fields via the API (and Bravo) difficult. [Upvote the associated Favro Feature request!](https://favro.canny.io/feature-requests/p/webhooks-api-custom-fields-visibilityscope-information)
The idea of "Custom Fields" is a bit confusing, since the Favro GUI doesn't make it clear which fields are built-in, or that the default "Status" field is a totally different kind of thing (a collection of "Columns"). Further, "Custom Fields" overlap many of the built-ins in *type*: you can have a Custom Status Field, or a Custom Members field, and so on.

All fields that are neither the build-ins nor the Widget-specific "Status" (Column) fields are "Custom Fields".
Expand All @@ -179,7 +181,6 @@ Collectively, these prevent you from using existing Cards (fetched while narrowi

Currently, the best way to find Custom Field identifiers for use by the Favro API (or Bravo) is to use a browser's dev tools in the web-app. For example, by using the browser's "Inspect element" on a Custom Field shown inside a card, you can find its ID in the HTML element's `id` field.

[Upvote the associated Favro Feature request!](https://favro.canny.io/feature-requests/p/webhooks-api-custom-fields-visibilityscope-information)

## Tips, Tricks, and Limitations

Expand Down
8 changes: 1 addition & 7 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
## Bravo Roadmap

### General TODO

- Add
- Revisit "Custom Fields" implementation to make sure it reflects how Custom Fields are used.

### User Stories

The things that we (Bscotch) want to enable via Bravo.

- Find a card on a board by name, and update any of its Custom Status Fields to a different value (matching by *name*).
- Custom Fields are GLOBAL in the API, and there is no way to filter them by board. Thus we need to be able to fetch a SAMPLE card from a board (probably offline) and then use that as a reference to get the relevant Custom Field IDs.
-

### Feature List

Expand Down Expand Up @@ -74,7 +68,7 @@ Ordered hierarchically by the Favro data model (not by priority order):
- 🔥 Cache cards to reduce API calls (cards change frequently, so this might be a bad idea anyway)
- Custom Fields
- ✔ Fetch and cache Custom Field definitions
- Add Card method to return hydrated Custom Field Definitions and Custom Field Values
- Add Card methods to return hydrated Custom Field Definitions and Custom Field Values
- ~~Create Custom Field~~ (No API endpoint for this)
- ~~Delete Custom Field~~ (No API endpoint for this)
- ~~Update a Custom Field~~ (No API endpoint for this)
Expand Down
1 change: 1 addition & 0 deletions src/lib/clientLib/BravoClientCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,5 +177,6 @@ export class BravoClientCache {
this._collections = undefined;
this._widgets.clear();
this._columns.clear();
this._customFields = undefined;
}
}

0 comments on commit 16eed35

Please sign in to comment.