diff --git a/config/application.properties b/config/application.properties index 06462f4..565db9b 100644 --- a/config/application.properties +++ b/config/application.properties @@ -92,6 +92,8 @@ navi.jira.base.url=https://navihq.atlassian.net/browse/ houston.channel.help.message=/houston: General command to open the other options| /houston severity: Opens the view to update severity of the incident| /houston set severity to : Sets the incident severity| /houston team: Opens the view to update team| /houston status: Opens the view to set status| /houston set status to : Sets the incident status| /houston description: Opens the view to set incident description| /houston set description to : Sets the incident description| /houston resolve: Opens the view to fill RCA and resolve| /houston rca: Opens the view to fill RCA non.houston.channel.help.message=/houston: General command to open the other options| /houston start: Opens the view to start a new incident +houston.default.team.id=HOUSTON_DEFAULT_TEAM_ID + jira.base.url=JIRA_BASE_URL jira.username=JIRA_USERNAME jira.api.token=JIRA_API_TOKEN diff --git a/service/incident_service.go b/service/incident_service.go index 3aca28d..b51d239 100644 --- a/service/incident_service.go +++ b/service/incident_service.go @@ -237,8 +237,12 @@ func (i *incidentService) GetIncidentResponseFromIncidentEntity( if incidents[incidentIndex].ReportingTeamId != nil { reportingTeamEntity, err := i.teamService.GetTeamById(*incidents[incidentIndex].ReportingTeamId) if err != nil { - logger.Error("error in fetching reporting team", zap.Error(err)) - return nil, err + logger.Warn("error in fetching reporting team, returning default team") + reportingTeamEntity, err = i.teamService.GetTeamById(viper.GetUint("houston.default.team.id")) + if err != nil { + logger.Error("error in fetching default team", zap.Error(err)) + return nil, err + } } reportingTeamResponse = teamDTOToIncidentHeaderOption(reportingTeamEntity.ToDTO()) }