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(rest): endpoint to get attachmentUsages for a project. #2103

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

rudra-superrr
Copy link
Contributor

@rudra-superrr rudra-superrr commented Aug 25, 2023

Issue: closes #2094

Description: updated the existing attachmentUsages endpoint with more fields in response structure.

@rudra-superrr rudra-superrr added needs code review needs general test This is general testing, meaning that there is no org specific issue to check for New-UI Level for the API and UI level changes for the new-ui labels Aug 25, 2023
@smrutis1
Copy link
Contributor

Code looks ok. But there are some additional fields in the response which is not required for the page. I believe.
image

It would be good if that can be removed.

Please refer this to ignore the booleans in the response.

@rudra-superrr rudra-superrr force-pushed the feat/attachmentUsages branch 2 times, most recently from 0743fb9 to 91a11c4 Compare October 23, 2023 08:27
@rudra-superrr
Copy link
Contributor Author

Hi @smrutis1, additional fields removed.

Copy link
Contributor

@smrutis1 smrutis1 left a comment

Choose a reason for hiding this comment

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

Requesting some minor changes

@@ -118,6 +118,7 @@
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
import org.eclipse.sw360.rest.resourceserver.release.ReleaseController;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove unused imports

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed the unused imports.

for (Map.Entry<String, Object> entry : releaseIdToUsage.entrySet()) {
Map<String, Object> originalValue = (Map<String, Object>) entry.getValue();
if (originalValue != null) {
originalValue.remove("setCreatedBy");
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be good to create constants of the fields like "setCreatedBy" etc. and remove all from the map

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Signed-off-by: rudra-superrr <rudra.chopra@siemens.com>
Copy link
Contributor

@smrutis1 smrutis1 left a comment

Choose a reason for hiding this comment

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

Code looks good. Tested successfully.

@smrutis1 smrutis1 added ready ready to merge and removed needs code review needs general test This is general testing, meaning that there is no org specific issue to check for labels Nov 7, 2023
@ag4ums ag4ums merged commit 8c014c7 into eclipse-sw360:main Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New-UI Level for the API and UI level changes for the new-ui ready ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Attachment Usage endpoint for project page
3 participants