← ClaudeAtlas

frappe-fixtureslisted

Frappe fixtures, workspaces, and sidebar setup. Use for exporting/syncing fixtures, Workspace + Workspace Sidebar + Desktop Icon configuration, nested-set fixture ordering, and per-environment ID pitfalls that break fresh-site migrations. Not for data-migration patches or patches.txt — use frappe-upgrade.
prilk-consulting/frappe-agent-kit · ★ 0 · Testing & QA · score 72
Install: claude install-skill prilk-consulting/frappe-agent-kit
# Fixtures, Workspaces & Sidebars ## Usage Use this skill when: - Exporting or syncing fixtures (`bench export-fixtures`, hooks `fixtures` list) - Setting up a Workspace, Workspace Sidebar, or Desktop Icon for an app - Debugging fresh-site `bench migrate` crashes caused by fixture ordering or per-environment links - Deciding between fixtures and install.py for custom fields ## Fixture basics ```python # hooks.py fixtures = [ {"dt": "Custom Field", "filters": [["module", "=", "My Module"]]}, {"dt": "Property Setter", "filters": [["module", "=", "My Module"]]}, {"dt": "Role", "filters": [["name", "in", ["My Role"]]]}, ] ``` ```bash bench --site <site> export-fixtures --app myapp # DB → apps/myapp/myapp/fixtures/*.json bench --site <site> migrate # JSON → DB (runs sync_fixtures) bench --site <site> execute frappe.utils.fixtures.sync_fixtures --args "['myapp']" # sync only ``` - **Always filter** — an unfiltered `{"dt": "Custom Field"}` exports every custom field on the site, including other apps'. Each app owns only its own records. - Use `or_filters` when records can't be matched by one field: `{"dt": "Wiki Document", "or_filters": [...]}`. - Fixture sync is **upsert-only**: deleting a record from the JSON does not delete it from sites that already have it. Removals need a patch. - Re-export after every UI-side change, and **diff the export before committing** — `export-fixtures` rewrites whole files and happily captures unrelate