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 obligations depending upon obligation level #2611

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rudra-superrr
Copy link
Contributor

@rudra-superrr rudra-superrr commented Sep 12, 2024

Issue: #2610

Description: endpoint to get obligations depending upon obligation level (Possible values are: License, Project, Component, Organization).

@rudra-superrr rudra-superrr linked an issue Sep 12, 2024 that may be closed by this pull request
@rudra-superrr rudra-superrr force-pushed the feat/projectPageObligations branch 2 times, most recently from 1085858 to 072a633 Compare September 12, 2024 09:41
@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 labels Sep 12, 2024
@akshitjoshii
Copy link
Contributor

Testing this PR

@akshitjoshii
Copy link
Contributor

Test was successful.

image

@GMishx GMishx removed the needs general test This is general testing, meaning that there is no org specific issue to check for label Oct 15, 2024
@RequestMapping(value = PROJECTS_URL + "/{id}/obligation", method = RequestMethod.GET)
public ResponseEntity<HalResource> getObligations(Pageable pageable,
@Parameter(description = "Project ID.") @PathVariable("id") String id,
@Parameter(description = "Obligation Level")
Copy link
Member

Choose a reason for hiding this comment

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

Please provide value set of supported values as OblLevel is a string.

public ResponseEntity<HalResource> getObligations(Pageable pageable,
@Parameter(description = "Project ID.") @PathVariable("id") String id,
@Parameter(description = "Obligation Level")
@RequestParam(value = "obligationLevel", required = true) String OblLevel)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@RequestParam(value = "obligationLevel", required = true) String OblLevel)
@RequestParam(value = "obligationLevel", required = true) String oblLevel)

@@ -437,6 +439,28 @@ public ObligationList getObligationData(String linkedObligationId, User user) th
return sw360ProjectClient.getLinkedObligations(linkedObligationId, user);
}

public Map<String, ObligationStatusInfo> setObligationsFromAdminSection(User user, Map<String, ObligationStatusInfo> obligationStatusMap,
Project project, String OblLevel) throws TException {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Project project, String OblLevel) throws TException {
Project project, String oblLevel) throws TException {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Endpoint to list project page obligations
3 participants