MCPcopy Index your code
hub / github.com/apache/devlake / issueWorklogHandler

Method issueWorklogHandler

backend/plugins/customize/service/service.go:686–705  ·  view source on GitHub ↗

issueWorklogHandler saves a record into the `issue_worklogs` table

(record map[string]interface{})

Source from the content-addressed store, hash-verified

684
685// issueWorklogHandler saves a record into the `issue_worklogs` table
686func (s *Service) issueWorklogHandler(record map[string]interface{}) errors.Error {
687 // create account
688 authorName, err := getStringField(record, "author_name", false)
689 if err != nil {
690 return err
691 }
692 if authorName != "" {
693 rawDataParams, err := getStringField(record, "_raw_data_params", true)
694 if err != nil {
695 return err
696 }
697 authorId, err := s.createOrUpdateAccount(authorName, rawDataParams)
698 if err != nil {
699 return err
700 }
701 record["author_id"] = authorId
702 }
703 delete(record, "author_name")
704 return s.dal.CreateWithMap(&ticket.IssueWorklog{}, record)
705}

Callers

nothing calls this directly

Calls 3

createOrUpdateAccountMethod · 0.95
getStringFieldFunction · 0.70
CreateWithMapMethod · 0.65

Tested by

no test coverage detected