Skip to content
Merged
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 @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Menu items names are properly translated from internal name in VSCode, Management Portal (#372)
- Now has proper locking behavior in `##class(SourceControl.Git.WebUIDriver).HandleRequest()`(#385)
- Git operations from the WebUI now don't unlock the session if they aren't read-only
- WebUI works properly for users with %Developer without needing to add further SQL privileges (#365)

## [2.3.1] - 2024-04-30

Expand Down
13 changes: 10 additions & 3 deletions cls/SourceControl/Git/Change.cls
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,24 @@ ClassMethod GetOtherDeveloperChanges() As %Boolean
{
set numEntries = 0
set fileToOtherDevelopers = {}
set query = "Select ItemFile, ChangedBy FROM SourceControl_Git.Change WHERE CHARINDEX('SourceControl.Git', Name)>0 AND Committed = '0' AND ChangedBy <> ?"
set query = "Select ItemFile, ChangedBy FROM SourceControl_Git.Change WHERE Committed = '0' AND ChangedBy <> ?"
set statement = ##class(%SQL.Statement).%New()
set status = statement.%Prepare(query)
set status = statement.%Prepare(query, 0)
$$$ThrowOnError(status)
set rset = statement.%Execute($username)
if (rset.%SQLCODE < 0) {
throw ##class(%Exception.SQL).CreateFromSQLCODE(rset.%SQLCODE,rset.%Message)
}
set tempFolder = ##class(SourceControl.Git.Utils).TempFolder()
while rset.%Next(.sc) {
$$$ThrowOnError(sc)
set filePath = "cls\"_$EXTRACT(rset.ItemFile, $FIND(rset.ItemFile,"cls\"),$LENGTH(rset.ItemFile))

if $FIND(rset.ItemFile, tempFolder) {
set filePath = $PIECE(rset.ItemFile, tempFolder, 2)
} else {
continue
}

set otherDevelopers = fileToOtherDevelopers.%Get(filePath, [])
do otherDevelopers.%Push(rset.ChangedBy)
do fileToOtherDevelopers.%Set(filePath, otherDevelopers)
Expand Down