MCPcopy
hub / github.com/apache/devlake / getStatusMapping

Function getStatusMapping

backend/plugins/tapd/tasks/shared.go:220–231  ·  view source on GitHub ↗

getStatusMapping creates a map of original status values to standard status values based on the provided TapdTaskData. It returns the created map.

(data *TapdTaskData)

Source from the content-addressed store, hash-verified

218// getStatusMapping creates a map of original status values to standard status values
219// based on the provided TapdTaskData. It returns the created map.
220func getStatusMapping(data *TapdTaskData) map[string]string {
221 stdStatusMappings := make(map[string]string)
222 if data.Options.ScopeConfig == nil {
223 return stdStatusMappings
224 }
225 mapping := data.Options.ScopeConfig.StatusMappings
226 // Map original status values to standard status values
227 for userStatus, stdStatus := range mapping {
228 stdStatusMappings[userStatus] = strings.ToUpper(stdStatus)
229 }
230 return stdStatusMappings
231}
232
233// getDefaultStdStatusMapping retrieves default standard status mappings for the given TapdTaskData and status list.
234// It takes TapdTaskData, a Dal interface, and a statusList of type S (models.TapdStatus).

Callers 5

ExtractStoriesFunction · 0.85
ConvertTaskChangelogFunction · 0.85
ConvertStoryChangelogFunction · 0.85
ExtractBugsFunction · 0.85
ConvertBugChangelogFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected