Skip to content
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
2 changes: 1 addition & 1 deletion sdm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.12</version>
<version>0.8.14</version>
<configuration>
<excludes>
<exclude>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ public List<String> copyAttachment(

JSONObject jsonObject = new JSONObject(responseBody);
JSONObject props = jsonObject.getJSONObject("succinctProperties");
String fileName = props.optString("cmis:contentStreamFileName");
String fileName = props.optString("cmis:name");
String mimeType = props.optString("cmis:contentStreamMimeType");
String objectId = props.optString("cmis:objectId");
return List.of(fileName, mimeType, objectId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,6 @@ private void createDraftEntries(CreateDraftEntriesRequest request) {

String fileName = attachmentMetadata.get(0);
String mimeType = attachmentMetadata.get(1);
if (mimeType.equalsIgnoreCase("application/internet-shortcut")) {
int dotIndex = fileName.lastIndexOf('.');
fileName = fileName.substring(0, dotIndex);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this is removed

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Earlier we were reading cmis:contentStreamFileName from DMS copyAttachments response as filename property in DB. cmis:contentStreamFileName contains .url appended in name and this name doesn't gets updated when we rename the file in DMS. That's why customer was facing the issue.

Whereas cmis:name doesn't have .url appended with the name of the link, so I have removed this part of code

}
String newObjectId = attachmentMetadata.get(2);

updatedFields.put("objectId", newObjectId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,7 @@ public void testCopyAttachment_Success() throws Exception {
// Prepare mock response JSON
String responseBody =
"{\"succinctProperties\":{"
+ "\"cmis:contentStreamFileName\":\"file1.pdf\","
+ "\"cmis:name\":\"file1.pdf\","
+ "\"cmis:contentStreamMimeType\":\"application/pdf\","
+ "\"cmis:objectId\":\"obj123\"}}";

Expand Down
Loading