Skip to content

[dataquery] Restrict filter CSV to visit labels for session #9732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

CamilleBeau
Copy link
Contributor

Brief summary of changes

This PR adds validation to the CSV upload for filters so that when "session" is selected the second column must only contain visit labels.

  • Have you updated related documentation?

Testing instructions (if applicable)

  1. Add fields for a query
  2. Go to add filters and click "Import from CSV"
  3. Click "Sessions" and try uploading a CSV with 2 columns where the second column does not contain valid or relevant visit labels. Make sure an error SWAL shows up
  4. Click "Sessions" and try uploading a CSV with 2 columns where the second column does contain valid and relevant visit labels. Make sure no error SWAL pops up and the filters are properly loaded

Link(s) to related issue(s)

@CamilleBeau CamilleBeau added Module: dataquery PR or issue related to (new) dataquery module 27.0.0 - Bugs Bugs Found in LORIS 27 testing labels Mar 26, 2025
@CamilleBeau CamilleBeau added this to the 27.0.0 milestone Mar 26, 2025
@adamdaudrich
Copy link
Collaborator

adamdaudrich commented Apr 1, 2025

generally, this fix works.

I used the following 2 column csv file

ddcid_pscid.csv

I selected

  • Candidate identifier fields: CandID
  • csv containing list of Sessions
  • Candidate Id type: DCCID
  • header line: Yes

the change sucessfully fires the sweetalert error message as follows:

Screenshot from 2025-04-01 10-38-14

However, when I selected

  • Candidate identifier fields: CandID
  • csv containing list of Sessions
  • Candidate Id type: PSCCID
  • headerline: yes

the file loaded successfully

and, after I ran the query, I see this:
Screenshot from 2025-04-01 10-45-27

seems confusing because I selected 'Sessions', uploaded a csv with two columns, and I'm getting a single column

@adamdaudrich
Copy link
Collaborator

updated my comment a few times, here.

@adamdaudrich adamdaudrich requested a review from driusan April 1, 2025 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
27.0.0 - Bugs Bugs Found in LORIS 27 testing Module: dataquery PR or issue related to (new) dataquery module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[dataquery] CSV upload with sessions selection
2 participants