Easygrid icon indicating copy to clipboard operation
Easygrid copied to clipboard

GlobalFilters are not being applied to Exports

Open kdoig opened this issue 10 years ago • 7 comments

In EasyGrid 1.6.3, when exporting a table with a global filter applied, the entire table is exported not just the filtered table.

kdoig avatar Sep 25 '14 08:09 kdoig

It's a bug. I will look into it.

Thanks

tudor-malene avatar Sep 25 '14 18:09 tudor-malene

I wasn't able to replicate this bug . Can you provide more details on your scenario?

tudor-malene avatar Sep 28 '14 19:09 tudor-malene

Hi Tudor,

sorry its taken me a while to get back to you. Im using EasyGrid 1.6.3

The globalFilter is as follows:

    //  Applies for all records returned
    //
    globalFilterClosure
    {
        if ( params.id =~ /^\d+$/ )
        {
            long id = params.id as long
            seqSample { eq( 'id', id ) }
        }

        order( 'reportable', 'desc' )
        order( 'curated',    'desc' )
    }

This filter is correctly applied when the grid is displayed but the export returns all records and memory gets exhausted. I can manually apply a filter with the filterToolbar to get the export to honour the filter but I need it to happen automatically so the export matches what's displayed in the screen grid.

Thanks for any help.

Regards, Ken Doig

Bioinformatics, Cancer Research Molecular Pathology Department email: [email protected]:[email protected] mob: 04 1122 5178

On 29/09/2014, at 5:21 AM, Tudor Malene wrote:

I wasn't able to replicate this bug . Can you provide more details on your scenario?

— Reply to this email directly or view it on GitHubhttps://github.com/tudor-malene/Easygrid/issues/121#issuecomment-57096628.

This email (including any attachments or links) may contain confidential and/or legally privileged information and is intended only to be read or used by the addressee. If you are not the intended addressee, any use, distribution, disclosure or copying of this email is strictly prohibited.
Confidentiality and legal privilege attached to this email (including any attachments) are not waived or lost by reason of its mistaken delivery to you. If you have received this email in error, please delete it and notify us immediately by telephone or email. Peter MacCallum Cancer Centre provides no guarantee that this transmission is free of virus or that it has not been intercepted or altered and will not be liable for any delay in its receipt.

kendoig avatar Oct 05 '14 10:10 kendoig

Hi Ken, It's the externalParams again.

They need to be passed to the export plugin tag. This needs to be added to EasygridTaglib.exportButton: attrs.params = GridUtils.externalParams(gridConfig), so that the id parameter is available in the globalFilterClosure

tudor-malene avatar Oct 05 '14 12:10 tudor-malene

Upgraded to 1.6.6 and added externalParams (['id']) to grid. Works like a charm, thanks very much Tudor.

Regards, Ken Doig

Bioinformatics, Cancer Research Molecular Pathology Department email: [email protected]:[email protected] mob: 04 1122 5178

On 05/10/2014, at 11:07 PM, Tudor Malene wrote:

Hi Ken, It's the externalParams again.

They need to be passed to the export plugin tag. This needs to be added to EasygridTaglib.exportButton: attrs.params = GridUtils.externalParams(gridConfig), so that the id parameter is available in the globalFilterClosure

— Reply to this email directly or view it on GitHubhttps://github.com/tudor-malene/Easygrid/issues/121#issuecomment-57934069.

This email (including any attachments or links) may contain confidential and/or legally privileged information and is intended only to be read or used by the addressee. If you are not the intended addressee, any use, distribution, disclosure or copying of this email is strictly prohibited.
Confidentiality and legal privilege attached to this email (including any attachments) are not waived or lost by reason of its mistaken delivery to you. If you have received this email in error, please delete it and notify us immediately by telephone or email. Peter MacCallum Cancer Centre provides no guarantee that this transmission is free of virus or that it has not been intercepted or altered and will not be liable for any delay in its receipt.

kendoig avatar Oct 07 '14 06:10 kendoig

Nice. I'll need to do some more work on this externalParams functionality. It causes a lot of problems

tudor-malene avatar Oct 09 '14 17:10 tudor-malene

Hi Tudor, I wondered if there was any way to set the export_title and thus the extract file name dynamically? I have a requirement to name the file differently according to how the grid has been filtered. BTW the plugin is fantastic, great work.

Regards Neil

neilv247 avatar Jun 30 '15 14:06 neilv247