getStatusMapping creates a map of original status values to standard status values based on the provided TapdTaskData. It returns the created map.
(data *TapdTaskData)
| 218 | // getStatusMapping creates a map of original status values to standard status values |
| 219 | // based on the provided TapdTaskData. It returns the created map. |
| 220 | func 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). |
no outgoing calls
no test coverage detected