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

Method sprintHandler

backend/plugins/customize/service/service.go:589–607  ·  view source on GitHub ↗

sprintHandler saves a record into the `sprints` table

(boardId string)

Source from the content-addressed store, hash-verified

587
588// sprintHandler saves a record into the `sprints` table
589func (s *Service) sprintHandler(boardId string) func(record map[string]interface{}) errors.Error {
590 return func(record map[string]interface{}) errors.Error {
591 id, err := getStringField(record, "id", true)
592 if err != nil {
593 return err
594 }
595 record["original_board_id"] = boardId
596 err = s.dal.CreateWithMap(&ticket.Sprint{}, record)
597 if err != nil {
598 return err
599 }
600
601 // Create board_sprint relation
602 return s.dal.CreateOrUpdate(&ticket.BoardSprint{
603 BoardId: boardId,
604 SprintId: id,
605 })
606 }
607}
608
609// ImportIssueChangelog imports csv file into the table `issue_changelogs`
610func (s *Service) ImportIssueChangelog(boardId string, file io.ReadCloser, incremental bool) errors.Error {

Callers 1

ImportSprintMethod · 0.95

Calls 3

getStringFieldFunction · 0.70
CreateWithMapMethod · 0.65
CreateOrUpdateMethod · 0.65

Tested by

no test coverage detected