Skip to content

Commit

Permalink
Merge pull request #702 from intersystems/fix-decomp-bad-cache
Browse files Browse the repository at this point in the history
Fix errors with decomposed production with invalid cache entries
  • Loading branch information
isc-tleavitt authored Jan 31, 2025
2 parents b29baf0 + 3f6851e commit cd942e7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed Discard / Stash not working on deletes (#688)
- Fixed errors deploying decomposed production changes on Windows network drives (#696)
- Improved performance of deploying changes to decomposed production items (#690)
- Fixed errors saving decomposed productions when invalid items in item cache (#701)
- Removed unnecessary Add and Remove menu items from decomposed productions (#701)

## [2.9.0] - 2025-01-09

Expand Down
7 changes: 4 additions & 3 deletions cls/SourceControl/Git/Extension.cls
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,9 @@ Method OnSourceMenuContextItem(itemName As %String, menuItemName As %String, ByR
} else {
set Enabled = $case(menuItemName, "AddToSC":1,:-1)
}

}
if ##class(SourceControl.Git.Utils).ItemIsProductionToDecompose(itemName) && ((menuItemName = "AddToSC") || (menuItemName = "RemoveFromSC")) {
set Enabled = -1
}
if (menuItemName '= "") {
set DisplayName = ..LocalizeName(menuItemName)
Expand Down Expand Up @@ -365,8 +367,7 @@ Method OnAfterSave(InternalName As %String, Object As %RegisteredObject = {$$$NU
if $data(productionItems) {
do ##class(SourceControl.Git.Change).RefreshUncommitted(,,,1)
}
}
if ..IsInSourceControl(InternalName) {
} elseif ..IsInSourceControl(InternalName) {
if fromWebApp {
if fullExternalName = ##class(SourceControl.Git.Utils).FullExternalName(InternalName) {
// Reimport item into database
Expand Down
4 changes: 2 additions & 2 deletions test/UnitTest/SourceControl/Git/ProductionDecomposition.cls
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ XData ProductionDefinition3

Method OnBeforeAllTests() As %Status
{
merge ..SourceControlGlobal = ^SYS("SourceControl")
return $$$OK
merge ..SourceControlGlobal = ^SYS("SourceControl")
return ##class(Ens.Director).StopProduction(,1)
}

Method OnBeforeOneTest() As %Status
Expand Down

0 comments on commit cd942e7

Please sign in to comment.