Segment Filtering is Broken

Feature(s) impacted

Segment filtering

Observed behavior

Applying any filters to certain segments results in an error: “The request to your server either failed or returned invalid data” (screenshot below). Specifically, I noticed that:

  • Filtering is always broken when the segment has more than one criteria listed in its definition
  • Filtering is never broken when the segment has only one criteria in its definition
  • Filtering is never broken on full table views (only Segments are impacted)

What I mean by “more than one criteria in its definition” is this:

Segments with only one criteria (like this) are working fine:

Expected behavior

I expect filtering to work on all segments. If it’s not possible for filters to work on segments with complex definitions, then filtering should be disabled for those views, and the reason should be clearly communicated to users.

Failure Logs

The console logs look like:

Bad Request: /forest/omics_profile/count
[30/Mar/2023 16:30:22] "GET /forest/omics_profile/count?fields%5Bomics_profile%5D=profile_id%2Cmodel_condition%2Comics_profile_funding_source%2Comics_order_date%2Ckit_id%2Csmid_ordered%2Cstatus%2Csmid_returned%2Cpdoid%2Comics_return_date%2Cdatatype%2Cbaits%2Cbam_public_sra_path%2Cprofile_source%2Cmain_sequencing_id%2Cblacklist_omics%2Cissue%2Cproposed_release_date%2Cpublic_release_date%2Cconsortium_release_date%2Cinternal_release_date%2Cibm_release_date%2Cdeliverables%2Comics_profile_flagship%2Cdestination_datasets%2Cblacklist_reason%2Cblacklist_expiration_date%2Cworkspace%2Cbilling_date%2Cline_sent_to_gp%2Cquote_to_bill%2Cextraction_needed%2Cline_received_by_gp%2Ccell_pellet_needed%2Ccell_available%2Cresubmit_for_extraction%2Ceta_for_omics_completion%2Cwgs_delivery_date%2Crna_delivery_date%2Cactual_seq_technology%2Ccollaborator_sample_id%2Cbsp_sample_id_csv%2Cproduct_goal%2Clcsets%2Clcset_protocol%2Cpdo_title%2Cproduct%2Cproject%2Csample_is_on_risk%2Csample_type%2Csm_id_matched%2Cversion%2Cpf_bases_bc%2Csample_coverage_normalized%2Csample_coverage_rounded&fields%5Bmodel_condition%5D=id&fields%5Bstatus%5D=id&fields%5Bdatatype%5D=id&fields%5Bbaits%5D=id&fields%5Bprofile_source%5D=id&fields%5Bworkspace%5D=id&filters=%7B%22aggregator%22%3A%22and%22%2C%22conditions%22%3A%5B%7B%22aggregator%22%3A%22and%22%2C%22conditions%22%3A%5B%7B%22field%22%3A%22status%3Aterm%22%2C%22operator%22%3A%22contains%22%2C%22value%22%3A%22Order%22%7D%2C%7B%22field%22%3A%22datatype%3Aterm%22%2C%22operator%22%3A%22contains%22%2C%22value%22%3A%22wgs%22%7D%5D%7D%2C%7B%22field%22%3A%22actual_seq_technology%22%2C%22operator%22%3A%22blank%22%2C%22value%22%3Anull%7D%5D%7D&timezone=America%2FNew_York HTTP/1.1" 400 35

Context

Hello @Sarah_Wessel :wave:,

Can you send me a screenshot of the error you have in your browser’s console and the request that fails in your browser’s network :pray:? It will help me to reproduce the bug.

Kind regards,

Florian

Hi Florian,

Thank you for following up! I am happy to upload those screenshots:

It looks like there are two requests which are failing:

Here’s some more detail on those two requests:


And here is what I see in the console:

Hey :wave:

We’re able to reproduce this issue on our end.
We opened a ticket in our issue tracker, we will let you know once the fix is released :+1:

Thanks for the report :pray:

1 Like

Hello Sarah,
We released a fix this morning, it is available on pypi (django-forestadmin · PyPI), version 1.4.7.

Best regards,
Julien.

6 Likes

Thank you! That fixes the problem for us!