Adds ExternalUserID and ExternalSource fields to issues table to allow external apps to track their own user identifiers when creating issues via API. Includes database migration v336, search filters, JSON API endpoint, and UI filter option. Adds locale strings across all 28 languages for external user filtering.
20 lines
523 B
Go
20 lines
523 B
Go
// Copyright 2026 MarketAlly. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package v1_26
|
|
|
|
import (
|
|
"xorm.io/xorm"
|
|
)
|
|
|
|
// AddExternalUserFieldsToIssue adds ExternalUserID and ExternalSource columns to the issue table
|
|
// These fields allow apps to track their own user IDs for issues submitted via the API
|
|
func AddExternalUserFieldsToIssue(x *xorm.Engine) error {
|
|
type Issue struct {
|
|
ExternalUserID string `xorm:"INDEX VARCHAR(255)"`
|
|
ExternalSource string `xorm:"VARCHAR(100)"`
|
|
}
|
|
|
|
return x.Sync(new(Issue))
|
|
}
|