Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,24 @@
runType = Measurement.MEASUREMENT_RUN_TYPE;
}

SensorValue rawValue = recordValues.get(rawColumn);
SensorValue refValue = recordValues.get(refColumn);

if (flushSensors) {
SensorValue rawValue = recordValues.get(rawColumn);
SensorValue refValue = recordValues.get(refColumn);
rawValue.setUserQC(Flag.FLUSHING, "Flushing");
refValue.setUserQC(Flag.FLUSHING, "Flushing");
flaggedSensorValues.add(rawValue);
flaggedSensorValues.add(refValue);
recordStatus = FLUSHING;
} else if (rawValue.getUserQCFlag().equals(Flag.FLUSHING)) {
/*
* If the Response Time has been changed, some values that were
* marked FLUSHING should have that flag removed.
*/
rawValue.removeUserQC(true);
refValue.removeUserQC(true);
flaggedSensorValues.add(rawValue);
flaggedSensorValues.add(refValue);

Check warning on line 145 in WebApp/src/uk/ac/exeter/QuinCe/data/Dataset/ControsPco2MeasurementLocator.java

View check run for this annotation

Codecov / codecov/patch

WebApp/src/uk/ac/exeter/QuinCe/data/Dataset/ControsPco2MeasurementLocator.java#L142-L145

Added lines #L142 - L145 were not covered by tests
}

if (recordStatus != FLUSHING) {
Expand Down
28 changes: 28 additions & 0 deletions WebApp/src/uk/ac/exeter/QuinCe/data/Dataset/SensorValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,34 @@
}
}

/**
* Remove any user QC flags, so the {@link #autoQC} becomes the basis for the
* value's QC result.
*
* <p>
* {@link Flag#LOOKUP} flags will not be replaced. {@link Flag#LOOKUP} flags
* will only be replaced if {@code force} is {@code true}.
* </p>
*
* @param force
* Force override of {@link Flag#FLUSHING} flags.
*/
public void removeUserQC(boolean force) {

boolean remove = true;

Check warning on line 384 in WebApp/src/uk/ac/exeter/QuinCe/data/Dataset/SensorValue.java

View check run for this annotation

Codecov / codecov/patch

WebApp/src/uk/ac/exeter/QuinCe/data/Dataset/SensorValue.java#L384

Added line #L384 was not covered by tests

if (userQCFlag.equals(Flag.LOOKUP)
|| (!force && userQCFlag.equals(Flag.FLUSHING))) {
remove = false;

Check warning on line 388 in WebApp/src/uk/ac/exeter/QuinCe/data/Dataset/SensorValue.java

View check run for this annotation

Codecov / codecov/patch

WebApp/src/uk/ac/exeter/QuinCe/data/Dataset/SensorValue.java#L388

Added line #L388 was not covered by tests
}

if (remove) {
userQCFlag = autoQC.size() > 0 ? Flag.NEEDED : Flag.ASSUMED_GOOD;
userQCMessage = "";
dirty = true;

Check warning on line 394 in WebApp/src/uk/ac/exeter/QuinCe/data/Dataset/SensorValue.java

View check run for this annotation

Codecov / codecov/patch

WebApp/src/uk/ac/exeter/QuinCe/data/Dataset/SensorValue.java#L393-L394

Added lines #L393 - L394 were not covered by tests
}
}

Check warning on line 396 in WebApp/src/uk/ac/exeter/QuinCe/data/Dataset/SensorValue.java

View check run for this annotation

Codecov / codecov/patch

WebApp/src/uk/ac/exeter/QuinCe/data/Dataset/SensorValue.java#L396

Added line #L396 was not covered by tests

/**
* Copy the user QC info from the specified SensorValue.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import uk.ac.exeter.QuinCe.data.Instrument.Calibration.Calibration;
import uk.ac.exeter.QuinCe.data.Instrument.Calibration.CalibrationDB;
import uk.ac.exeter.QuinCe.jobs.Job;
import uk.ac.exeter.QuinCe.jobs.files.DataReductionJob;
import uk.ac.exeter.QuinCe.jobs.files.LocateMeasurementsJob;

@ManagedBean
@SessionScoped
Expand All @@ -38,7 +38,7 @@

@Override
protected Class<? extends Job> getReprocessJobClass() {
return DataReductionJob.class;
return LocateMeasurementsJob.class;

Check warning on line 41 in WebApp/src/uk/ac/exeter/QuinCe/web/Instrument/CalculationCoefficientsBean.java

View check run for this annotation

Codecov / codecov/patch

WebApp/src/uk/ac/exeter/QuinCe/web/Instrument/CalculationCoefficientsBean.java#L41

Added line #L41 was not covered by tests
}

@Override
Expand Down
Loading