Skip to content

Commit 3ac5e43

Browse files
committed
fix: errors from trying to export undecomposed production; remove invalid menu items
1 parent d2fba37 commit 3ac5e43

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
- Fixed Import All options not importing the Embedded Git configuration file
1919
- Improved performance of IDE editing and baselining of decomposed productions
2020
- Fixed Discard / Stash not working on deletes (#688)
21+
- Fixed errors saving decomposed productions when invalid items in item cache (#701)
22+
- Removed unnecessary Add and Remove menu items from decomposed productions (#701)
2123

2224
## [2.9.0] - 2025-01-09
2325

cls/SourceControl/Git/Extension.cls

Lines changed: 4 additions & 3 deletions
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

0 commit comments

Comments
 (0)