Skip to content

Commit 2b33639

Browse files
committed
added some comments to utils file to describe changes and updated changelog
1 parent 3f618ba commit 2b33639

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.4.0] - 2024-05-31
9+
10+
### Added
11+
- Items mapped from database other than namespace's default routine database are now ignored by default when exporting or adding files
12+
- New setting to configure whether mapped items should be should be treated as read-only
13+
814
## [2.3.1] - 2024-04-30
915

1016
### Fixed

cls/SourceControl/Git/Utils.cls

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,11 +531,11 @@ ClassMethod AddToSourceControl(InternalName As %String) As %Status
531531
continue
532532
}
533533

534+
// Items mapped to namespace's non default routine database are ignored if set to be read-only
534535
if (settings.mappedItemsReadOnly && ..FileIsMapped(InternalName)) {
535536
continue
536537
}
537538

538-
// SKIP IF A MAPPED ITEM
539539
set FileType = ##class(SourceControl.Git.Utils).Type(.FileInternalName)
540540

541541
set @..#Storage@("items", FileInternalName) = ""
@@ -1365,8 +1365,9 @@ ClassMethod ExportItem(InternalName As %String, expand As %Boolean = 1, force As
13651365
quit $$$OK
13661366
}
13671367

1368+
// Items mapped to namespace's non default routine database are ignored if set to be read-only
13681369
if (..FileIsMapped(InternalName) && settings.mappedItemsReadOnly) {
1369-
write "Skipping export since mapping to another database found."
1370+
write "Mapping to another database found. Skipping export"
13701371
quit $$$OK
13711372
}
13721373
set filenames($I(filenames)) = filename

csp/gitprojectsettings.csp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ body {
8080
} else {
8181
set settings.mappedItemsReadOnly = 0
8282
}
83-
set ^mtemphw($i(^mtemphw)) = $get(%request.Data("mappedItemsReadOnly", 1))
8483
set i = 1
8584
set param = "NoFolders"
8685
kill settings.Mappings
@@ -266,7 +265,7 @@ body {
266265

267266

268267
<div class="form-group row mb-3">
269-
<label for="mappedItemsReadOnly" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Whether items mapped from another database should be read-only. If enabled, mapped items won't be saved to source control or exported. NOTE: These are different from the mappings configured in this settings page"> Treat Mapped Items as Read-only</label>
268+
<label for="mappedItemsReadOnly" class="offset-sm-1 col-sm-3 col-form-label" data-toggle="tooltip" data-placement="top" title="Whether items mapped from a database other than this namespace's default routine database should be read-only. If enabled, mapped items won't be saved to source control or exported. NOTE: These are different from the mappings configured in this settings page"> Treat Mapped Items as Read-only</label>
270269
<div class="col-sm-7">
271270

272271
<div class="custom-control custom-switch custom-switch-no-border">

0 commit comments

Comments
 (0)