Skip to content

Search source: Download saves a browser CSV that never shows under Your exports #2198

Open

Description

@SudoThijn

Description

On a page with the search source, Download builds a CSV in the browser. That file never becomes an export run, so the exports card next to the list ("Your exports") can never show it, with its expiry and download count. The design board DqZoekresultaten pairs the two: Downloaden in the header and "Uw exports" listing the files made, with when they expire and how often they were downloaded (board capability 10.7, "Export files area with expiry and download counts"). In Dossiq this is the search page, /apps/dossiq/search?q=<term>.

Steps to reproduce

  1. In Dossiq, open /apps/dossiq/search?q=<a word from a case title>.
  2. Click Download.
  3. Reload the page and look at Your exports.

Expected behaviour

The download becomes an export that Your exports lists with the time it was made, its download count and its expiry, and that can be downloaded again from there until it expires.

Actual behaviour

The browser saves search-term.csv at once. No request goes to the server, so no export run exists and Your exports does not change.

The file name is also the page's untranslated title template ("Search: {term}") made into a slug, so every search downloads as search-term.csv, whatever the term was.

Cause

src/components/CnIndexPage/CnIndexPage.vue onHeaderButton (:11537-11544): a named source without a mass-export listener goes to downloadNamedRows() (:11596), which turns the loaded rows into a CSV blob in the browser. Its file name comes from this.title (:11601), the raw template, not the title the page shows.

A search spans several schemas plus files, and OpenRegister's export runs are per register and schema, so this probably needs a decision on how a search result list becomes an export run (one run per kind, or a run for a search). Not verified whether OpenRegister has an export route that takes a search.

Acceptance criteria

  • Download on a search page produces an export run that Your exports lists with when it was made, its download count and its expiry
  • The file name names the search term
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions