@@ -11,13 +11,14 @@ function ManageDeprecationViewModel(id, versionDeprecationStateDictionary, defau
1111 versionData . Text ,
1212 version ,
1313 version === defaultVersion ,
14- versionData . IsLegacy || versionData . IsOther ) ;
14+ versionData . IsLegacy || versionData . HasCriticalBugs || versionData . IsOther ) ;
1515 } ) ;
1616
1717 this . dropdown = new MultiSelectDropdown ( items , "version" , "versions" ) ;
1818 this . chosenItemsConflictWarning = ko . pureComputed ( function ( ) {
1919 var chosenItems = self . dropdown . chosenItems ( ) ;
2020 var isLegacy = self . isLegacy ( ) ;
21+ var hasCriticalBugs = self . hasCriticalBugs ( ) ;
2122 var isOther = self . isOther ( ) ;
2223 var warningMessage = null ;
2324 var areMultipleVersionsSelected = chosenItems . length > 1 ;
@@ -38,13 +39,13 @@ function ManageDeprecationViewModel(id, versionDeprecationStateDictionary, defau
3839 continue ;
3940 }
4041
41- if ( versionData . IsLegacy || versionData . IsOther ) {
42+ if ( versionData . IsLegacy || versionData . HasCriticalBugs || versionData . IsOther ) {
4243 hasVersionsWithExistingDeprecationState = true ;
4344 break ;
4445 }
4546 }
4647
47- if ( isLegacy || isOther ) {
48+ if ( isLegacy || hasCriticalBugs || isOther ) {
4849 if ( areMultipleVersionsSelected && hasVersionsWithExistingDeprecationState ) {
4950 // Show a warning if multiple versions are selected and at least one has an existing deprecation
5051 // The user should be aware they are replacing existing deprecations
@@ -63,6 +64,7 @@ function ManageDeprecationViewModel(id, versionDeprecationStateDictionary, defau
6364 } , this ) ;
6465
6566 this . isLegacy = ko . observable ( false ) ;
67+ this . hasCriticalBugs = ko . observable ( false ) ;
6668 this . isOther = ko . observable ( false ) ;
6769
6870 // The ID entered into the alternate package ID textbox.
@@ -76,8 +78,8 @@ function ManageDeprecationViewModel(id, versionDeprecationStateDictionary, defau
7678
7779 // The list of options in the alternate package version dropdown.
7880 this . alternatePackageVersions = ko . pureComputed ( function ( ) {
79- // Include an "Any Version" option in case users want to select the package registration.
80- return [ strings_AnyVersion ] . concat ( self . alternatePackageVersionsCached ( ) ) ;
81+ // Include a "Latest" selection label in case users want to select the package registration.
82+ return [ strings_SelectAlternateVersionOption ] . concat ( self . alternatePackageVersionsCached ( ) ) ;
8183 } , this ) ;
8284
8385 // Whether or not the versions of the currently entered alternate package ID have been loaded.
@@ -141,8 +143,8 @@ function ManageDeprecationViewModel(id, versionDeprecationStateDictionary, defau
141143 this . alternatePackageVersion = ko . pureComputed ( function ( ) {
142144 if ( self . alternatePackageId ( ) ) {
143145 var version = self . chosenAlternatePackageVersion ( ) ;
144- // If the chosen version is the "Any Version" string , don't submit it with the form.
145- if ( version !== strings_AnyVersion ) {
146+ // If the chosen version string is the selection label , don't submit it with the form.
147+ if ( version !== strings_SelectAlternateVersionOption ) {
146148 return version ;
147149 }
148150 }
@@ -171,6 +173,7 @@ function ManageDeprecationViewModel(id, versionDeprecationStateDictionary, defau
171173 id : id ,
172174 versions : self . dropdown . chosenItems ( ) ,
173175 isLegacy : self . isLegacy ( ) ,
176+ hasCriticalBugs : self . hasCriticalBugs ( ) ,
174177 isOther : self . isOther ( ) ,
175178 alternatePackageId : self . alternatePackageId ( ) ,
176179 alternatePackageVersion : self . alternatePackageVersion ( ) ,
@@ -198,6 +201,7 @@ function ManageDeprecationViewModel(id, versionDeprecationStateDictionary, defau
198201 }
199202
200203 versionData . IsLegacy = self . isLegacy ( ) ;
204+ versionData . HasCriticalBugs = self . hasCriticalBugs ( ) ;
201205 versionData . IsOther = self . isOther ( ) ;
202206 versionData . AlternatePackageId = self . alternatePackageId ( ) ;
203207 versionData . AlternatePackageVersion = self . alternatePackageVersion ( ) ;
@@ -211,6 +215,7 @@ function ManageDeprecationViewModel(id, versionDeprecationStateDictionary, defau
211215 }
212216
213217 self . isLegacy ( versionData . IsLegacy ) ;
218+ self . hasCriticalBugs ( versionData . HasCriticalBugs ) ;
214219 self . isOther ( versionData . IsOther ) ;
215220
216221 self . chosenAlternatePackageId ( versionData . AlternatePackageId ) ;
0 commit comments