Skip to content

Conversation

@driusan
Copy link
Collaborator

@driusan driusan commented Jun 13, 2011

I'd like someone to test this code change and merge it into the master Loris-Trunk. This should allow files to be deleted and re-run without losing the QC results.

Before running it, the following SQL needs to be run before using it to create the new QC table:

CREATE TABLE files_qcstatus (
FileQCID int(11) PRIMARY KEY auto_increment,
FileID int(11) UNIQUE NULL,
SeriesUID varchar(64) UNIQUE NULL,
QCStatus enum('Pass', 'Fail'),
QCFirstChangeTime int(10) unsigned,
QCLastChangeTime int(10) unsigned
);

If you ever delete/rerun everything, the following should associate the QC results with the new file id:
UPDATE files_qcstatus SET FileID=null WHERE SeriesUID IS NOT NULL;
CREATE TEMPORARY TABLE FileIDs as SELECT pf.FileID, pf.Value as SeriesUID FROM parameter_file pf JOIN parameter_type pt USING (ParameterTypeID) WHERE pt.Name='series_instance_uid';
UPDATE files_qcstatus qc SET FileID=(SELECT FileID FROM FileIDs f WHERE f.SeriesUID=qc.SeriesUID);

If it works and gets merged, you should remove the QCStatus, QCFirstChangeTime, and QCLastChangeTime from the files table (after inserting them into the files_qcstatus table) to avoid confusion between the two places.

@brownlee
Copy link

Without MRI's, I can't really comment on the efficacy of this pull request. I trust the group.

@samirdas
Copy link
Contributor

This has been run in November 2011 for Louis. He had a few issues, but upon examination, it did not appear that the issues were related to this update. Therefore finally pushing this now.

samirdas added a commit that referenced this pull request Apr 26, 2012
@samirdas samirdas merged commit 67ddc18 into aces:master Apr 26, 2012
mohadesz pushed a commit that referenced this pull request Apr 17, 2013
Cleaned up participant status. Now only 1 textarea and required flag
samirdas added a commit that referenced this pull request Mar 25, 2014
christinerogers referenced this pull request in taracampbell/Loris-backup Oct 7, 2014
adding to #3 about table column/row labelling.
Jkat referenced this pull request in Jkat/Loris Oct 21, 2014
Added time_range check to mri_protocol, will add schema to Loris-Trunk.
rathisekaran pushed a commit to rathisekaran/Loris that referenced this pull request Nov 25, 2014
@driusan driusan added Language: SQL PR or issue that update SQL code Category: Feature PR or issue that aims to introduce a new feature Release: Add to release notes PR whose changes should be highlighted in the release notes Category: Cleanup PR or issue introducing/requiring at least one clean-up operation and removed Release: Add to release notes PR whose changes should be highlighted in the release notes labels Dec 16, 2014
christinerogers added a commit to christinerogers/Loris that referenced this pull request Jan 7, 2015
adding to aces#3 about table column/row labelling.
samirdas pushed a commit that referenced this pull request Oct 30, 2015
The following error was being generated in MySQL >= 5.7.5:

Expression #3 of ORDER BY clause is not in GROUP BY clause and contains
nonaggregated column 'ibis.ft.Status' which is not functionally
dependent on columns in GROUP BY clause; this is incompatible with
sql_mode=only_full_group_by

This removes the non-aggregated order_by (ft.Status) which doesn't seem
to be needed by the query.
ted-strauss-K1 pushed a commit to ted-strauss-K1/Loris that referenced this pull request Nov 19, 2015
samirdas pushed a commit that referenced this pull request Feb 26, 2016
stellarxo referenced this pull request in stellarxo/Loris May 9, 2016
alisterdev referenced this pull request in alisterdev/Loris Jul 29, 2016
alisterdev referenced this pull request in alisterdev/Loris Aug 9, 2016
alisterdev referenced this pull request in alisterdev/Loris Sep 13, 2016
driusan pushed a commit that referenced this pull request Sep 14, 2016
* Add updated modernizr and datepicker depedencies

* Update default depedencies list

* Use datepicker when input date is not supported

* Bring jquery UI back

* Update test to use new date classes

* Add missing CSS classes

* Attempt to pass travis #3
davidblader referenced this pull request in davidblader/Loris Feb 1, 2017
workaround main.css for visit label headers
ZainVirani pushed a commit to ZainVirani/Loris that referenced this pull request Jul 4, 2017
infinite variable nesting implemented + unit tests
cmadjar referenced this pull request in cmadjar/Loris Sep 22, 2017
Add SQL directory and symlinks for LORIS
jesscall pushed a commit to jesscall/Loris that referenced this pull request Feb 26, 2018
Heyoo, 'tis the file upload progress
maltheism referenced this pull request in maltheism/Loris May 8, 2018
# This is the 1st commit message:

fixing sql injection

fixing sql injection

Remove debugging line

Use ?? idiom replacement

# This is the commit message #2:

remove  variable that was used for debugging

# This is the commit message #3:

update comment to PHP 7
ZainVirani pushed a commit to ZainVirani/Loris that referenced this pull request May 25, 2018
driusan pushed a commit that referenced this pull request May 28, 2018
* # This is a combination of 3 commits.
# This is the 1st commit message:

fixing sql injection

fixing sql injection

Remove debugging line

Use ?? idiom replacement

# This is the commit message #2:

remove  variable that was used for debugging

# This is the commit message #3:

update comment to PHP 7

* remove isset because using ?? idiom

* Cleanup variables not used and added logging with error message for user

* fix error message to display

* fix table name containing back ticks in database

* Using DB excape results in back ticks and need to be stripped

* remove debugging echo code

* function viewData() created and handles showing data with permission check

* revert changes to bugfix as was on wrong branch

* move function down

* travis cleanup

* spaces cleanup
@jftunteng jftunteng added this to the PRE 20.0.0 milestone Jan 7, 2020
HenriRabalais referenced this pull request in HenriRabalais/Loris Feb 17, 2020
laemtl pushed a commit to laemtl/Loris that referenced this pull request Oct 19, 2020
@driusan driusan mentioned this pull request Oct 30, 2020
1 task
driusan added a commit that referenced this pull request Oct 29, 2021
When accessing an instrument from RB, I got the error:

```
Fatal error: Uncaught TypeError: Argument 1 passed to ValidatableIdentifier::__construct() must be of the type string, null given, called in
/home/driusan/Code/Loris/php/libraries/NDB_BVL_Instrument.class.inc on line 2863 and defined in /home/driusan/Code/Loris/php/libraries/Valida
tableIdentifier.php:57 Stack trace: #0 /home/driusan/Code/Loris/php/libraries/NDB_BVL_Instrument.class.inc(2863): ValidatableIdentifier->__co
nstruct(NULL) #1 /home/driusan/Code/Loris/src/Middleware/UserPageDecorationMiddleware.php(241): NDB_BVL_Instrument->handle(Object(Laminas\Dia
ctoros\ServerRequest)) #2 /home/driusan/Code/Loris/src/Middleware/PageDecorationMiddleware.php(57): LORIS\Middleware\UserPageDecorationMiddle
ware->process(Object(Laminas\Diactoros\ServerRequest), Object(NDB_BVL_Instrument_aosi)) #3 /home/driusan/Code/Loris/php/libraries/NDB_Page.cl
ass.inc(735): LORIS\Middleware\PageDecorationMiddleware->process(Object(Laminas\Diactoros\ServerRequest), Object(NDB_BVL_Instrument_aosi)) #4
 /home/driusan/Code/Loris/php/libraries/NDB_BVL_In in /home/driusan/Code/Loris/php/libraries/ValidatableIdentifier.php on line 57
```

This fixes the type error so that the instrument page loads.
@charliehenrib charliehenrib mentioned this pull request Feb 21, 2022
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Category: Cleanup PR or issue introducing/requiring at least one clean-up operation Category: Feature PR or issue that aims to introduce a new feature Language: SQL PR or issue that update SQL code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants