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): new endpoint merge components #1970

Merged

Conversation

muhammadali9699
Copy link
Contributor

Please provide a summary of your changes here.

  • This PR is to merge two components

Issue: #1957

Suggest Reviewer

You can suggest reviewers here with an @mention.

How To Test?

Create two components
Get components ids from couch db and pass it to the api as a param
add body of component with changes made in component (sample given below)
{
"type":"component",
"name":"Deemo comp 4",
"attachments":[
],
"createdOn":"2023-05-17",
"componentType":"INNER_SOURCE",
"createdBy":"admin@sw360.org",
"subscribers":[
],
"moderators":[
],
"roles":{
},
"visbility":"EVERYONE",
"externalIds":{
},
"additionalData":{
},
"releases":[
],
"categories":[
"virtual-machine",
"big-data",
"javaee"
]
}

###Screenshot
Screenshot 2023-05-25 235146

@ag4ums ag4ums added needs code review needs general test This is general testing, meaning that there is no org specific issue to check for REST New-UI Level for the API and UI level changes for the new-ui labels May 26, 2023
@eldrin30
Copy link
Contributor

@muhammadali9699, resolve the conflicts

@eldrin30
Copy link
Contributor

eldrin30 commented Jun 5, 2023

Testing was successful

@heliocastro
Copy link
Contributor

Please rebase

@eldrin30 eldrin30 removed the needs general test This is general testing, meaning that there is no org specific issue to check for label Jun 6, 2023
@muhammadali9699
Copy link
Contributor Author

@heliocastro Rebase successful.

@@ -695,4 +695,23 @@ private ImportBomRequestPreparation handleImportBomRequestPreparation(ImportBomR
}
return importBomRequestPreparationResponse;
}

@PreAuthorize("hasAuthority('WRITE')")
@RequestMapping(value = COMPONENTS_URL + "/mergecomponents", method = RequestMethod.POST)
Copy link
Contributor

@ag4ums ag4ums Jun 12, 2023

Choose a reason for hiding this comment

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

PATCH seems more appropriate here as the component is getting updated

@muhammadali9699 muhammadali9699 force-pushed the feat/api/mergeComponents branch 2 times, most recently from c532e63 to 6cba03e Compare June 13, 2023 09:14
@eldrin30
Copy link
Contributor

Code looks good, kindly rebase

@muhammadali9699
Copy link
Contributor Author

@eldrin30 code rebased.

@eldrin30
Copy link
Contributor

As discussed, since its a new endpoint, kindly add the same in component.adoc file

@muhammadali9699 muhammadali9699 force-pushed the feat/api/mergeComponents branch 3 times, most recently from 0cb524e to 9fa623d Compare July 3, 2023 11:55
Signed-off-by: Muhammad Ali <alimuhammad@siemens.com>
@muhammadali9699
Copy link
Contributor Author

@eldrin30 Documentation added please verify.

@eldrin30
Copy link
Contributor

eldrin30 commented Jul 4, 2023

Code looks good :)

@eldrin30 eldrin30 added ready ready to merge and removed needs code review labels Jul 4, 2023
@ag4ums ag4ums merged commit 393e471 into eclipse-sw360:main Jul 4, 2023
1 check passed
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 REST
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants