diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f78f0e2a96..525e676691d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ Changes * [UI/REST]: Improved querying performance of metadata for line list and REST API. * [UI]: Complete upgrade of project settings to use Ant Design. * [Developer]: Removing many unnecessary files from the `.war` file build to reduce build size. +* [UI]: Fixed issue where analyses page was not displaying for some IRIDA instances due to deprecated analysis states in their audit tables. 20.09 to 21.01 -------------- diff --git a/src/main/java/ca/corefacility/bioinformatics/irida/model/enums/AnalysisState.java b/src/main/java/ca/corefacility/bioinformatics/irida/model/enums/AnalysisState.java index b7c983e4330..affabcbd8bf 100644 --- a/src/main/java/ca/corefacility/bioinformatics/irida/model/enums/AnalysisState.java +++ b/src/main/java/ca/corefacility/bioinformatics/irida/model/enums/AnalysisState.java @@ -22,6 +22,22 @@ public enum AnalysisState { */ NEW("NEW"), + /** + * Occurs when an analysis is downloading remote files + * @deprecated This is no longer a valid state. This must still exist in IRIDA + * in cases where this state has been recored in the audit tables. + */ + @Deprecated(since = "0.17.0") + DOWNLOADING("DOWNLOADING"), + + /** + * Occurs when an analysis has completed downloading remote files + * @deprecated This is no longer a valid state. This must still exist in IRIDA + * in cases where this state has been recored in the audit tables. + */ + @Deprecated(since = "0.17.0") + FINISHED_DOWNLOADING("FINISHED_DOWNLOADING"), + /** * Occurs when an analysis is starting to be submitted. */ diff --git a/src/main/resources/i18n/messages.properties b/src/main/resources/i18n/messages.properties index f46b0052dd8..82691ab9fde 100644 --- a/src/main/resources/i18n/messages.properties +++ b/src/main/resources/i18n/messages.properties @@ -1414,6 +1414,12 @@ analysis.page.admin.title=All Analyses analysis.btn.filter=Filter Analysis analysis.select.all=All analysis.state.NEW=Queued + +# These two states are deprecated but are required in order to handle situations where +# audit tables from old analyses still have these states. +analysis.state.DOWNLOADING=Downloading +analysis.state.FINISHED_DOWNLOADING=Finished downloading + analysis.state.PREPARING=Preparing analysis.state.PREPARED=Prepared analysis.state.SUBMITTED=Submitted @@ -2534,4 +2540,4 @@ ChartTypeButtons.columnChart=Column Chart # SimpleRadioButtonGroup Component # # ========================================================================================== # SimpleRadioButtonGroup.yes=Yes -SimpleRadioButtonGroup.no=No \ No newline at end of file +SimpleRadioButtonGroup.no=No diff --git a/src/test/java/ca/corefacility/bioinformatics/irida/ria/unit/web/analysis/AnalysesTableAjaxControllerTest.java b/src/test/java/ca/corefacility/bioinformatics/irida/ria/unit/web/analysis/AnalysesTableAjaxControllerTest.java index 26e9a0bb944..03481158edb 100644 --- a/src/test/java/ca/corefacility/bioinformatics/irida/ria/unit/web/analysis/AnalysesTableAjaxControllerTest.java +++ b/src/test/java/ca/corefacility/bioinformatics/irida/ria/unit/web/analysis/AnalysesTableAjaxControllerTest.java @@ -68,15 +68,17 @@ public void testGetAnalysisStates() throws Exception { mockMvc.perform(get("/ajax/analyses/states").principal(mock(Principal.class))) .andExpect(status().isOk()) .andExpect(jsonPath("$[0].value", is("NEW"))) - .andExpect(jsonPath("$[1].value", is("PREPARING"))) - .andExpect(jsonPath("$[2].value", is("PREPARED"))) - .andExpect(jsonPath("$[3].value", is("SUBMITTING"))) - .andExpect(jsonPath("$[4].value", is("RUNNING"))) - .andExpect(jsonPath("$[5].value", is("FINISHED_RUNNING"))) - .andExpect(jsonPath("$[6].value", is("COMPLETING"))) - .andExpect(jsonPath("$[7].value", is("COMPLETED"))) - .andExpect(jsonPath("$[8].value", is("TRANSFERRED"))) - .andExpect(jsonPath("$[9].value", is("POST_PROCESSING"))); + .andExpect(jsonPath("$[1].value", is("DOWNLOADING"))) + .andExpect(jsonPath("$[2].value", is("FINISHED_DOWNLOADING"))) + .andExpect(jsonPath("$[3].value", is("PREPARING"))) + .andExpect(jsonPath("$[4].value", is("PREPARED"))) + .andExpect(jsonPath("$[5].value", is("SUBMITTING"))) + .andExpect(jsonPath("$[6].value", is("RUNNING"))) + .andExpect(jsonPath("$[7].value", is("FINISHED_RUNNING"))) + .andExpect(jsonPath("$[8].value", is("COMPLETING"))) + .andExpect(jsonPath("$[9].value", is("COMPLETED"))) + .andExpect(jsonPath("$[10].value", is("TRANSFERRED"))) + .andExpect(jsonPath("$[11].value", is("POST_PROCESSING"))); } @Test