Skip to content

Commit 80622da

Browse files
committed
Ensure checkbox values included in JSON even if unchecked
1 parent 30a40b0 commit 80622da

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

.github/workflows/build_latest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ jobs:
4040
repo_token: "${{ secrets.PAT }}"
4141
automatic_release_tag: "latest"
4242
prerelease: true
43-
title: "DISCVR Development Build: ${{ fromJson(steps.get_default_branch.outputs.data).default_branch }}"
43+
title: "Development Build: ${{ fromJson(steps.get_default_branch.outputs.data).default_branch }}"
4444
files: /home/runner/work/_temp/_github_home/lkDist/discvr/DISCVR-*

SequenceAnalysis/resources/web/SequenceAnalysis/panel/SequenceAnalysisPanel.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ Ext4.define('SequenceAnalysis.panel.SequenceAnalysisPanel', {
255255
version: 2
256256
};
257257

258-
//first add the general params
259-
Ext4.apply(json, this.down('#runInformation').getForm().getFieldValues());
258+
//first add the general params. Note: include all to ensure we include unchecked checkboxes. Using useDataValues=false to ensure we get the string-serialized value
259+
Ext4.apply(json, this.down('#runInformation').getForm().getValues(false, false, false, false));
260260

261261
json['alignment.doAlignment'] = this.down('#doAlignment').getValue();
262262

@@ -305,13 +305,15 @@ Ext4.define('SequenceAnalysis.panel.SequenceAnalysisPanel', {
305305
helpPopup: 'Check to delete the intermediate files created by this pipeline. In general these are not needed and it will save disk space. These files might be useful for debugging though.',
306306
name: 'deleteIntermediateFiles',
307307
inputValue: true,
308+
uncheckedValue: false,
308309
checked: true,
309310
xtype: 'checkbox'
310311
},{
311312
fieldLabel: 'Copy Inputs To Working Directory?',
312313
helpPopup: 'Check to copy the input files to the working directory. Depending on your environment, this may or may not help performance.',
313314
name: 'copyInputsLocally',
314315
inputValue: true,
316+
uncheckedValue: false,
315317
checked: false,
316318
xtype: 'checkbox'
317319
}, this.getSaveTemplateCfg(),{
@@ -320,6 +322,7 @@ Ext4.define('SequenceAnalysis.panel.SequenceAnalysisPanel', {
320322
hidden: !LABKEY.Security.currentUser.isAdmin,
321323
name: 'submitJobToReadsetContainer',
322324
inputValue: true,
325+
uncheckedValue: false,
323326
checked: false,
324327
xtype: 'checkbox'
325328
}]

SequenceAnalysis/resources/web/SequenceAnalysis/panel/VariantProcessingPanel.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,12 +407,11 @@ Ext4.define('SequenceAnalysis.panel.VariantProcessingPanel', {
407407
return;
408408
}
409409

410-
Ext4.Msg.wait('Submitting...');
411410
var json = {
412411
handlerClass: 'org.labkey.sequenceanalysis.' + (this.showGenotypeGVCFs ? 'analysis.GenotypeGVCFHandler' : 'pipeline.ProcessVariantsHandler'),
413412
outputFileIds: this.outputFileIds,
414413
params: Ext4.encode(values)
415-
}
414+
};
416415

417416
if (Ext4.isDefined(values.doSplitJobs)) {
418417
json.doSplitJobs = !!values.doSplitJobs;
@@ -441,6 +440,7 @@ Ext4.define('SequenceAnalysis.panel.VariantProcessingPanel', {
441440
}
442441
}
443442

443+
Ext4.Msg.wait('Submitting...');
444444
LABKEY.Ajax.request({
445445
url: LABKEY.ActionURL.buildURL('sequenceanalysis', actionName),
446446
jsonData: json,
@@ -465,8 +465,8 @@ Ext4.define('SequenceAnalysis.panel.VariantProcessingPanel', {
465465
version: 2
466466
};
467467

468-
//first add the general params
469-
Ext4.apply(json, this.down('#runInformation').getForm().getFieldValues());
468+
//first add the general params. Note: include all to ensure we include unchecked checkboxes. Using useDataValues=false to ensure we get the string-serialized value
469+
Ext4.apply(json, this.down('#runInformation').getForm().getValues(false, false, false, false));
470470

471471
//then append each section
472472
var sections = this.query('sequenceanalysis-analysissectionpanel');

SequenceAnalysis/resources/web/SequenceAnalysis/panel/VariantScatterGatherPanel.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Ext4.define('SequenceAnalysis.panel.VariantScatterGatherPanel', {
6161
name: 'scatterGather.allowSplitChromosomes',
6262
fieldLabel: 'Allow Split Contigs',
6363
value: true,
64+
uncheckedValue: false,
6465
inputValue: true,
6566
helpPopup: 'If true, a given chromosome/contig can be split between jobs. Otherwise chromosomes are always intact across jobs.'
6667
});

SequenceAnalysis/resources/web/SequenceAnalysis/window/OutputHandlerWindow.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ Ext4.define('SequenceAnalysis.window.OutputHandlerWindow', {
250250
return;
251251
}
252252

253-
//Note: include all to ensure we include unchecked checkboxes
253+
//Note: include all to ensure we include unchecked checkboxes. Using useDataValues=false to ensure we get the string-serialized value
254254
var params = this.down('form').getForm().getValues(false, false, false, false);
255255
var json = {
256256
handlerType: this.handlerType,

0 commit comments

Comments
 (0)