Skip to content

Commit

Permalink
improve list
Browse files Browse the repository at this point in the history
  • Loading branch information
lantoli committed Apr 15, 2024
1 parent 12d6bf8 commit e283f90
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tools/jira-release-version/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,16 @@ func getVersionID(client *jira.Client, versionName string) string {

func moveDoneIssues(client *jira.Client, versionName string) {
jql := fmt.Sprintf("project = %s AND status in (Resolved, Closed) AND fixVersion = %s", projectKey, versionNameNext)
list, _, err := client.Issue.Search(context.Background(), jql, &jira.SearchOptions{MaxResults: 1000})
options := &jira.SearchOptions{MaxResults: 1000, Fields: []string{"NoFieldsNeeded"}}
list, _, err := client.Issue.Search(context.Background(), jql, options)
if err != nil {
log.Fatalf("Error retrieving issues: %v", err)
}
keys := make([]string, len(list))
for i := range list {
issue := &list[i]
keys[i] = issue.Key
moveIssue(client, issue.Key, versionName)
key := list[i].Key
keys[i] = key
moveIssue(client, key, versionName)
}
if len(keys) > 0 {
fmt.Println("Done issues moved:", strings.Join(keys, ", "))
Expand Down

0 comments on commit e283f90

Please sign in to comment.