
๐งOption
Get custom field options
package main
import (
"context"
"github.com/ctreminiom/go-atlassian/v2/jira/v2"
"log"
"os"
)
func main() {
var (
host = os.Getenv("HOST")
mail = os.Getenv("MAIL")
token = os.Getenv("TOKEN")
)
atlassian, err := v2.New(nil, host)
if err != nil {
return
}
atlassian.Auth.SetBasicAuth(mail, token)
var (
fieldID = "customfield_10038"
contextID = 10180
)
fieldOptions, response, err := atlassian.Issue.Field.Context.Option.Gets(context.Background(), fieldID, contextID, nil, 0, 50)
if err != nil {
log.Fatal(err)
}
log.Println("HTTP Endpoint Used", response.Endpoint)
for _, option := range fieldOptions.Values {
log.Println(option)
}
}Create custom field options
Update custom field options
Delete custom field options
Reorder custom field options
Last updated
Was this helpful?