Skip to content

Add support for auditUserComment field for assay import #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 19, 2024
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
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# The LabKey Remote API Library for Java - Change Log

## version 6.2.0-SNAPSHOT
## version TBD
*Released*: TBD
* Add support for `auditUserComment` field for assay import

## version 6.1.0-SNAPSHOT
## version 6.1.0
*Released*: 26 February 2024
* [Issue 49238](https://www.labkey.org/home/Developer/issues/issues-details.view?issueId=49238): Fix so all command responses correctly decode as UTF-8.
* Add MoveRowsCommand to query
Expand Down
10 changes: 10 additions & 0 deletions src/org/labkey/remoteapi/assay/ImportRunCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public class ImportRunCommand extends PostCommand<ImportRunResponse>
private String _comment;
private Map<String, Object> _properties;
private Map<String, Object> _batchProperties;
private String _auditUserComment;

// Only one of the follow is allowed
private List<Map<String, Object>> _dataRows;
Expand Down Expand Up @@ -116,6 +117,11 @@ public void setPlateMetadata(JSONObject plateMetadata)
_plateMetadata = plateMetadata;
}

public void setAuditUserComment(String auditUserComment)
{
_auditUserComment = auditUserComment;
}

@Override
protected ImportRunResponse createResponse(String text, int status, String contentType, JSONObject json)
{
Expand Down Expand Up @@ -157,6 +163,8 @@ protected HttpPost createRequest(URI uri)
json.put("runFilePath", _runFilePath);
if (_plateMetadata != null)
json.put("plateMetadata", _plateMetadata);
if (_auditUserComment != null)
json.put("auditUserComment", _auditUserComment);

builder.addTextBody("json", json.toString(), ContentType.APPLICATION_JSON);
}
Expand All @@ -169,6 +177,8 @@ protected HttpPost createRequest(URI uri)
builder.addTextBody("name", _name);
if (_comment != null)
builder.addTextBody("comment", _comment);
if (_auditUserComment != null)
builder.addTextBody("auditUserComment", _auditUserComment);
if (_properties != null)
{
for (Map.Entry<String, Object> entry : _properties.entrySet())
Expand Down