@@ -35,7 +35,7 @@ import (
3535// TODO(bwplotka): Consider renaming this package to ticketer.
3636
3737type jiraIssueService interface {
38- Search (jql string , options * jira.SearchOptions ) ([]jira.Issue , * jira.Response , error )
38+ SearchV2JQL (jql string , options * jira.SearchOptionsV2 ) ([]jira.Issue , * jira.Response , error )
3939 GetTransitions (id string ) ([]jira.Transition , * jira.Response , error )
4040
4141 Create (issue * jira.Issue ) (* jira.Issue , * jira.Response , error )
@@ -330,13 +330,13 @@ func (r *Receiver) search(projects []string, issueLabel string) (*jira.Issue, bo
330330 // Search multiple projects in case issue was moved and further alert firings are desired in existing JIRA.
331331 projectList := "'" + strings .Join (projects , "', '" ) + "'"
332332 query := fmt .Sprintf ("project in(%s) and labels=%q order by resolutiondate desc" , projectList , issueLabel )
333- options := & jira.SearchOptions {
333+ options := & jira.SearchOptionsV2 {
334334 Fields : []string {"summary" , "priority" , "status" , "resolution" , "resolutiondate" , "description" , "comment" },
335335 MaxResults : 2 ,
336336 }
337337
338338 level .Debug (r .logger ).Log ("msg" , "search" , "query" , query , "options" , fmt .Sprintf ("%+v" , options ))
339- issues , resp , err := r .client .Search (query , options )
339+ issues , resp , err := r .client .SearchV2JQL (query , options )
340340 if err != nil {
341341 retry , err := handleJiraErrResponse ("Issue.Search" , resp , err , r .logger )
342342 return nil , retry , err
0 commit comments