warren830 commented on code in PR #1994:
URL: https://github.com/apache/incubator-devlake/pull/1994#discussion_r889884799
##########
plugins/jira/api/connection.go:
##########
@@ -246,27 +129,11 @@ PATCH /plugins/jira/connections/:connectionId
"basicAuthEncoded": "generated by `echo -n <jira login email>:<jira
token> | base64`",
"epicKeyField": "name of customfield of epic key",
"storyPointField": "name of customfield of story point",
- "typeMappings": { // optional, send empty object to delete all
typeMappings of the data connection
- "userType": {
- "standardType": "devlake standard type",
- "statusMappings": { // optional, send empt object to
delete all status mapping for the user type
- "userStatus": {
- "standardStatus": "devlake standard
status"
- }
- }
- }
- }
}
*/
func PatchConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput,
error) {
- // load from db
- jiraConnection, err := findConnectionByInputParam(input)
- if err != nil {
- return nil, err
- }
-
- // update from request and save to database
- err = refreshAndSaveJiraConnection(jiraConnection, input.Body)
+ jiraConnection := &models.JiraConnection{}
+ err := helper.Patch(input, jiraConnection, db)
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]