Skip to content

Commit 79a681c

Browse files
committed
Allow require reason on storage changes
1 parent 5131897 commit 79a681c

3 files changed

Lines changed: 24 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# The LabKey Remote API Library for Java - Change Log
22

3-
## version 7.3.0-SNAPSHOT
3+
## version 7.4.0-SNAPSHOT
44
*Released*: TBD
5+
6+
## version 7.3.0
7+
*Released*: X June 2026
58
* Update Gradle version and remove some deprecated syntax
9+
* Add support for `auditUserComment` on `BaseStorageCommand` (`CreateCommand`, `UpdateCommand`, `DeleteCommand`)
610

711
## version 7.2.0
812
*Released*: 17 February 2026

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ repositories {
7070

7171
group = "org.labkey.api"
7272

73-
version = "7.3.0-SNAPSHOT"
73+
version = "7.3.0-storageComment-SNAPSHOT"
7474

7575
dependencies {
7676
api "org.json:json:${jsonObjectVersion}"

src/org/labkey/remoteapi/storage/BaseStorageCommand.java

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
public abstract class BaseStorageCommand extends PostCommand<StorageCommandResponse>
2222
{
2323
private final StorageRow _storageRow;
24+
private String _auditUserComment;
2425

2526
public BaseStorageCommand(String action, StorageRow storageRow)
2627
{
@@ -47,6 +48,22 @@ protected StorageCommandResponse createResponse(String text, int status, String
4748
@Override
4849
public JSONObject getJsonObject()
4950
{
50-
return _storageRow.toJsonObject();
51+
JSONObject json = _storageRow.toJsonObject();
52+
if (_auditUserComment != null)
53+
json.put("auditUserComment", _auditUserComment);
54+
return json;
55+
}
56+
57+
public String getAuditUserComment()
58+
{
59+
return _auditUserComment;
60+
}
61+
62+
/**
63+
* @param auditUserComment the comment to attach to the audit log record for this storage change.
64+
*/
65+
public void setAuditUserComment(String auditUserComment)
66+
{
67+
_auditUserComment = auditUserComment;
5168
}
5269
}

0 commit comments

Comments
 (0)