fix(build): update custom field API to match renamed model functions
Branch Policy Check / Verify merge target (pull_request) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
PR RC Release / Build RC Release (pull_request) Has been cancelled
Universal: Build & Release / Promote to RC (pull_request) Has been cancelled
Branch Cleanup / Delete merged branch (pull_request) Has been cancelled
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Branch Policy Check / Verify merge target (pull_request) Has been cancelled
Universal: PR Check / Branch Policy (pull_request) Has been cancelled
Generic: Repo Health / Site Health (pull_request) Has been cancelled
Generic: Repo Health / Access control (pull_request) Has been cancelled
Universal: PR Check / Validate PR (pull_request) Has been cancelled
Generic: Repo Health / Site Health (push) Has been cancelled
Generic: Repo Health / Access control (push) Has been cancelled
PR RC Release / Build RC Release (pull_request) Has been cancelled
Universal: Build & Release / Promote to RC (pull_request) Has been cancelled
Branch Cleanup / Delete merged branch (pull_request) Has been cancelled
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -44,7 +44,7 @@ func ListCustomFields(ctx *context.APIContext) {
|
||||
|
||||
// GetCustomField gets a custom field definition by ID
|
||||
func GetCustomField(ctx *context.APIContext) {
|
||||
field, err := issues_model.GetCustomFieldByID(ctx, ctx.PathParamInt64("fieldId"))
|
||||
field, err := issues_model.GetCustomFieldDefByID(ctx, ctx.PathParamInt64("fieldId"))
|
||||
if err != nil {
|
||||
ctx.APIErrorInternal(err)
|
||||
return
|
||||
@@ -76,7 +76,7 @@ func CreateCustomField(ctx *context.APIContext) {
|
||||
Options: form.Options,
|
||||
DefaultVal: form.DefaultValue,
|
||||
}
|
||||
if err := issues_model.CreateCustomField(ctx, field); err != nil {
|
||||
if err := issues_model.CreateCustomFieldDef(ctx, field); err != nil {
|
||||
ctx.APIErrorInternal(err)
|
||||
return
|
||||
}
|
||||
@@ -86,7 +86,7 @@ func CreateCustomField(ctx *context.APIContext) {
|
||||
// EditCustomField updates a custom field definition
|
||||
func EditCustomField(ctx *context.APIContext) {
|
||||
form := web.GetForm(ctx).(*api.EditCustomFieldOption)
|
||||
field, err := issues_model.GetCustomFieldByID(ctx, ctx.PathParamInt64("fieldId"))
|
||||
field, err := issues_model.GetCustomFieldDefByID(ctx, ctx.PathParamInt64("fieldId"))
|
||||
if err != nil {
|
||||
ctx.APIErrorInternal(err)
|
||||
return
|
||||
@@ -115,7 +115,7 @@ func EditCustomField(ctx *context.APIContext) {
|
||||
field.DefaultVal = *form.DefaultValue
|
||||
}
|
||||
|
||||
if err := issues_model.UpdateCustomField(ctx, field); err != nil {
|
||||
if err := issues_model.UpdateCustomFieldDef(ctx, field); err != nil {
|
||||
ctx.APIErrorInternal(err)
|
||||
return
|
||||
}
|
||||
@@ -124,7 +124,7 @@ func EditCustomField(ctx *context.APIContext) {
|
||||
|
||||
// DeleteCustomField deletes a custom field and all its values
|
||||
func DeleteCustomField(ctx *context.APIContext) {
|
||||
field, err := issues_model.GetCustomFieldByID(ctx, ctx.PathParamInt64("fieldId"))
|
||||
field, err := issues_model.GetCustomFieldDefByID(ctx, ctx.PathParamInt64("fieldId"))
|
||||
if err != nil {
|
||||
ctx.APIErrorInternal(err)
|
||||
return
|
||||
@@ -133,7 +133,7 @@ func DeleteCustomField(ctx *context.APIContext) {
|
||||
ctx.APIErrorNotFound()
|
||||
return
|
||||
}
|
||||
if err := issues_model.DeleteCustomField(ctx, field.ID); err != nil {
|
||||
if err := issues_model.DeleteCustomFieldDef(ctx, field.ID); err != nil {
|
||||
ctx.APIErrorInternal(err)
|
||||
return
|
||||
}
|
||||
@@ -142,7 +142,7 @@ func DeleteCustomField(ctx *context.APIContext) {
|
||||
|
||||
// GetIssueCustomFields gets all custom field values for an issue
|
||||
func GetIssueCustomFields(ctx *context.APIContext) {
|
||||
values, err := issues_model.GetCustomFieldValues(ctx, ctx.PathParamInt64("index"))
|
||||
values, err := issues_model.GetCustomFieldValuesMap(ctx, ctx.PathParamInt64("index"))
|
||||
if err != nil {
|
||||
ctx.APIErrorInternal(err)
|
||||
return
|
||||
@@ -166,7 +166,7 @@ func SetIssueCustomField(ctx *context.APIContext) {
|
||||
fieldID := ctx.PathParamInt64("fieldId")
|
||||
|
||||
// Verify field belongs to this repo
|
||||
field, err := issues_model.GetCustomFieldByID(ctx, fieldID)
|
||||
field, err := issues_model.GetCustomFieldDefByID(ctx, fieldID)
|
||||
if err != nil {
|
||||
ctx.APIErrorInternal(err)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user