Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds some more validation late in the path to creating task arrays.
The "after_form" method is re-invoked on each task created for a task array. This re-triggers also all the special module codes that apply to after_form.
I've had to re-organize some controller code in TaskController:
TO TEST THIS:
a) my favorite way was to turn online a bourreau in my test environment but never actually start it. That way I could fill the task forms and click launch over and over and nothing was actually processed on the bourreau. Find your bourreur in the console, set its "online" to true. Don't even start it.
b) You will need a BoutiquesTask that has more than one file input, but only one mandatory, and that has validation tests on that file input. I used hippunfold in cbrain-plugins-neuro.
c) have several "BidsSubject" registered, along with normal files and FileCollections. Create a CbrainFileList with 3 BidsSubject, another one with 1 BidsSubject and a normal file, etc.
d) I have tested things by selecing in the file manager these combinations
I tried things by assigning the bids subject field in the form, or not assigning anything.
In all possible combinations I found that the form reacted properly with messages about what was not correct. In the end I was only able to create tasks if my main input contained ONLY bids subjects named "sub-1".