-
Notifications
You must be signed in to change notification settings - Fork 179
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
[imaging_browser] Now relying on getSetting->tblScanTypes for the New Data column #2912
Conversation
@@ -124,7 +124,8 @@ class NDB_Menu_Filter_Imaging_Browser extends NDB_Menu_Filter | |||
as QCLastChangeTime FROM files | |||
LEFT JOIN files_qcstatus USING (FileID) | |||
WHERE OutputType='native' AND AcquisitionProtocolID | |||
NOT IN (1, 2, 3, 52) GROUP BY files.SessionID) nd | |||
IN (". | |||
implode(",", array_keys($scan_id_types)) .") GROUP BY files.SessionID) nd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know where $scan_id_types comes from, but this doesn't seem safe.
It looks like it's all scan id types that exist, making this in clause appear pointless.
Given that AcquisitionProtocolID 1, 2, and 3 don't exist because of the stupid default schema, and 52 in the default schema is 'scout' (which should probably be excluded at the protocol level, not in an imaging browser query), couldn't the same thing by achieved by just taking out the AcquisitionProtocolID part of the where clause?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is based on Louis request that he only want the protocols that are being QCed to show as new in the new column.
Moving this to 17.2 as it was stated in the LORIS meeting that |
@johnsaigle This PR is important to the IBIS project since if it is merged in 17.1, this module will no longer need to be overridden. Thank you for considering projects requirements as well. |
Cool works for me. |
This is effectively filtering out the 2 dti files from the raisinbread dataset if the only tblScanTypes are t1 and t2. If I add 'dti' in the tblScanTypes config list, the files are shown. |
@driusan I am moving this into the |
I removed the passed manual test because what @xlecours noted is indeed happening and it is not the intended behavior.
(rows should not be impacted by what scan types you select; just columns)
|
@MounaSafiHarab @xlecours I've modified the code to allow for no selected scan type. I've also removed the scan type from the where clause since we do not want to auto filter out stuff |
@gluneau I am not sure what to test regarding the |
Let me know when the New Data column filter is implemented so I can re-test |
It is all good, except if you choose no scan types at all where you get an error loading data (it is an unlikely/impractical situation) |
tested it, and it works well now! |
The new column is now in line with the tblScanTypes from the settings.
This removes hard coded AcquisitionProtocolID values from this module.