Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
@walt noticed that CSV exports are not respecting exposed filters, as described in this forum topic: https://farmos.discourse.group/t/looking-for-farmos-2-x-migration-tester...
Steps to reproduce
Go to Records > Assets > Plants and export a CSV. The CSV will contain ALL assets - not just Plants.
Proposed resolution
TBD
Remaining tasks
TBD
User interface changes
None.
API changes
None.
Data model changes
None.
Issue fork farm-3224663
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
m.stentaAdding "Needs tests" tag so we remember to add an automated test for this, to prevent future regression.
Comment #3
m.stentaMoving this to "stable blocker" as it does not need to block "beta".
Comment #4
m.stentaI'm investigating this and it seems that filters in general ARE working fine. The issue is the "Export CSV" link that is generated on
/assets/[type]
paths does not include thetype[]=[type]
query parameter to filter by asset type. We are automatically filtering by type on those paths via a contextual filter, which does not get passed through to the CSV displays.We may be able to alter the "Export CSV" links to add this parameter. That might be easiest way to fix this one...
Comment #5
m.stentaRenaming this to make it a bit more specific. Still a bit misleading perhaps... the "type" filter DOES work when you use it on the
/assets
or/logs
paths... it is only an issue on the "by type" paths (eg:/assets/[type]
).Comment #6
m.stentaAh actually... just noticing that the type-specific columns are also missing from CSVs. Not sure if that deserves its own issue, or if this can be generalized.
Comment #7
m.stentaRe-generalizing the title of this. I have fixes and automated tests coming together for all of the above...
Comment #9
m.stentaComment #11
m.stentaMerged.
Comment #12
BOTLFarm CreditAttribution: BOTLFarm commentedThis appears to still be broken for quantity reports. It is only exporting the first 10 results to csv. Maybe this is a different issue.
Comment #13
m.stenta@BOTLFarm - Oh yes that sounds like a different issue. Can you start a new one and provide some steps to reproduce? Thanks!