Skip to content
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

feat: add labels, when pinning case from replay #340

Merged
merged 1 commit into from
Dec 26, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ public Response validInvitation(@Valid @RequestBody ValidInvitationRequestType r
return ResponseUtils.successResponse(responseType);
}

@Deprecated
@PostMapping("/addItemFromRecord")
@ResponseBody
public Response addItemFromRecord(@Valid @RequestBody FSAddItemFromRecordRequestType request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,7 @@ public MutablePair<String, String> addItemFromRecordByDefault(
fsAddItemFromRecordRequest.setPlanId(request.getPlanId());
fsAddItemFromRecordRequest.setRecordId(request.getRecordId());
fsAddItemFromRecordRequest.setOperationId(request.getOperationId());
fsAddItemFromRecordRequest.setLabelIds(request.getLabelIds());

FSTreeDto treeDto = fsTreeRepository.queryFSTreeById(request.getWorkspaceId());
if (treeDto == null) {
Expand Down Expand Up @@ -835,6 +836,9 @@ public MutablePair<String, String> addItemFromRecord(FSAddItemFromRecordRequestT
String newRecordId = storageCase.getNewRecordId(request.getRecordId());
caseDto.setRecordId(newRecordId);

// set labels
caseDto.setLabelIds(request.getLabelIds());

KeyValuePairDto recordHeader = new KeyValuePairDto();
recordHeader.setKey(AREX_RECORD_ID);
recordHeader.setValue(newRecordId);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.arextest.web.model.contract.contracts.filesystem;

import java.util.Set;
import javax.validation.constraints.NotBlank;
import lombok.Data;

Expand All @@ -16,4 +17,6 @@ public class FSAddItemFromRecordRequestType {
private String recordId;
@NotBlank(message = "operationId cannot be empty")
private String operationId;

private Set<String> labelIds;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.arextest.web.model.contract.contracts.filesystem;

import java.util.Set;
import javax.validation.constraints.NotBlank;
import lombok.Data;

Expand All @@ -21,4 +22,6 @@ public class FsAddItemFromRecordByDefaultRequestType {
private String recordId;
@NotBlank(message = "operationId cannot be empty")
private String operationId;

private Set<String> labelIds;
}