Skip to content

Commit cd942e7

Browse files
authored
Merge pull request #702 from intersystems/fix-decomp-bad-cache
Fix errors with decomposed production with invalid cache entries
2 parents b29baf0 + 3f6851e commit cd942e7

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2222
- Fixed Discard / Stash not working on deletes (#688)
2323
- Fixed errors deploying decomposed production changes on Windows network drives (#696)
2424
- Improved performance of deploying changes to decomposed production items (#690)
25+
- Fixed errors saving decomposed productions when invalid items in item cache (#701)
26+
- Removed unnecessary Add and Remove menu items from decomposed productions (#701)
2527

2628
## [2.9.0] - 2025-01-09
2729

cls/SourceControl/Git/Extension.cls

+4-3
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,9 @@ Method OnSourceMenuContextItem(itemName As %String, menuItemName As %String, ByR
263263
} else {
264264
set Enabled = $case(menuItemName, "AddToSC":1,:-1)
265265
}
266-
266+
}
267+
if ##class(SourceControl.Git.Utils).ItemIsProductionToDecompose(itemName) && ((menuItemName = "AddToSC") || (menuItemName = "RemoveFromSC")) {
268+
set Enabled = -1
267269
}
268270
if (menuItemName '= "") {
269271
set DisplayName = ..LocalizeName(menuItemName)
@@ -365,8 +367,7 @@ Method OnAfterSave(InternalName As %String, Object As %RegisteredObject = {$$$NU
365367
if $data(productionItems) {
366368
do ##class(SourceControl.Git.Change).RefreshUncommitted(,,,1)
367369
}
368-
}
369-
if ..IsInSourceControl(InternalName) {
370+
} elseif ..IsInSourceControl(InternalName) {
370371
if fromWebApp {
371372
if fullExternalName = ##class(SourceControl.Git.Utils).FullExternalName(InternalName) {
372373
// Reimport item into database

test/UnitTest/SourceControl/Git/ProductionDecomposition.cls

+2-2
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ XData ProductionDefinition3
156156

157157
Method OnBeforeAllTests() As %Status
158158
{
159-
merge ..SourceControlGlobal = ^SYS("SourceControl")
160-
return $$$OK
159+
merge ..SourceControlGlobal = ^SYS("SourceControl")
160+
return ##class(Ens.Director).StopProduction(,1)
161161
}
162162

163163
Method OnBeforeOneTest() As %Status

0 commit comments

Comments
 (0)