Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Configure prompt no longer quits out with an unhelpful error if existing boolean settings are null (#962)
- Branch names are now constrained to a reasonable set of allowed characters, fixing an issue where branch names with special characters were hidden without explanation (#914)
- PTD documents that are not decomposed production items may now be added to source control (#965)
- Fixed a bug where interop deployment manager would in some cases fail because it tried to load unrelated items from the repo (#977)

## [2.16.0] - 2026-03-06

Expand Down
3 changes: 2 additions & 1 deletion cls/SourceControl/Git/Production.cls
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,8 @@ ClassMethod GetModifiedItemsAfterSave(internalName As %String, Output modifiedIt
} else {
// If editing/adding/deleting from Studio, VS Code, or Interop Editor UI, mark all items for edit then find adds/deletes
if source = "IDE" {
// only compile f editing from IDE
// if editing from IDE, compile to populate the Ens_Config.Item tables, but do not trigger source control hooks.
new %SourceControl
$$$ThrowOnError($System.OBJ.Compile(productionName, "ck-d/multicompile=0"))
}
set productionConfig = ##class(Ens.Config.Production).%OpenId(productionName)
Expand Down
20 changes: 20 additions & 0 deletions test/UnitTest/SourceControl/Git/ProductionDecomposition.cls
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,26 @@ Method TestImportItemsWithError()
do $$$AssertStatusOK(##class(SourceControl.Git.Utils).ImportItem("UnitTest.SampleProduction||Settings-a|Ens.Activity.Operation.Local.PTD"))
}

Method TestStrayUncommittedPTDDoesNotBreakSave()
{
new %SourceControl
do $System.OBJ.Delete(..#ProductionName)
$$$ThrowOnError(##class(SourceControl.Git.Production).CreateProduction(..#ProductionName))
do ##class(%Studio.SourceControl.Interface).SourceControlCreate()

do $$$LogMessage("an unrelated non-class PTD left uncommitted in the queue")
do ##class(Ens.Util.ProjectTextDocument).Delete("UnitTest.Git.Demo.PTD")
$$$ThrowOnError(##class(Ens.Util.ProjectTextDocument).Create("plain text not loadable as a class","UnitTest.Git.Demo","stray PTD"))
$$$ThrowOnError(##class(SourceControl.Git.Utils).AddToSourceControl("UnitTest.Git.Demo.PTD"))
// intentionally not committed: it stays in the uncommitted queue that RefreshUncommitted walks
set strayFile = ##class(SourceControl.Git.Utils).FullExternalName("UnitTest.Git.Demo.PTD")
do $$$AssertTrue(##class(SourceControl.Git.Change).IsUncommitted(strayFile))

do $$$LogMessage("saving the decomposed production must succeed despite the stray PTD in the queue")
$$$ThrowOnError(%SourceControl.OnBeforeSave(..#ProductionName_".cls"))
do $$$AssertStatusOK(%SourceControl.OnAfterSave(..#ProductionName_".cls"))
}

/// PTD documents that do not represent decomposed production items may be added to source control as .PTD files
Method TestNonHostPTD()
{
Expand Down
Loading