Skip to content

Commit

Permalink
update cohort deprecation text
Browse files Browse the repository at this point in the history
  • Loading branch information
JFriel committed Feb 3, 2025
1 parent d49f24b commit a7ead35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Build on and target .Net 9 rather than 8
- Simplify DB Patching Interface
- Fix issue with Simple File Extractor pipeline component checking
- Improve cohort deprecation override test

## [8.4.2] - 2024-12-18

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,11 @@ protected void DeprecateExistingCohorts(IBasicActivateItems activator, Extractab

}
var cohortIDs = cohortsThatAreDeprecatedOrHaveBeenDeprecated.Select(c => c.ID).ToList();
var extractionConfigurations = activator.RepositoryLocator.DataExportRepository.GetAllObjects<ExtractionConfiguration>().Where(ei => ei.Cohort_ID is not null && cohortIDs.Contains((int)ei.Cohort_ID));
if (extractionConfigurations.Any() && activator.YesNo("Would you like to replace all uses of a deprecated cohort in this project with this cohort?", "Replace Deprecated Cohorts"))
var extractionConfigurations = activator.RepositoryLocator.DataExportRepository.GetAllObjects<ExtractionConfiguration>().Where(ei => !ei.IsReleased && ei.Cohort_ID is not null && cohortIDs.Contains((int)ei.Cohort_ID));
if (extractionConfigurations.Any() && activator.YesNo("""
Would you like to replace all uses of a deprecated cohort in this project with this cohort?
This will update all non-released Extraction configurations that use the now deprecated cohort to use the chort you have just created.
""", "Replace Deprecated Cohorts"))
{
foreach (var config in extractionConfigurations)
{
Expand Down

0 comments on commit a7ead35

Please sign in to comment.