Skip to content

Commit

Permalink
feat: add labels, when pinning case from replay (#340)
Browse files Browse the repository at this point in the history
  • Loading branch information
coryhh authored Dec 26, 2023
1 parent bd68130 commit 60356f8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
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 @@ -747,6 +747,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 @@ -847,6 +848,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;
}

0 comments on commit 60356f8

Please sign in to comment.