Gitea Actions Demo / Deploy (push) Successful in 32s
Issue changes are recorded per field in the issue_change table, in the same transaction as the issue itself. The new history module exposes: - GET /api/issues/:issueId/history — change timeline grouped by save - GET /api/issues/stats/daily — created, status transitions and status snapshot per day, with time zone support The migration backfills history for existing issues. Setting a field to its current value no longer bumps updatedAt or emits issue.updated.
22 lines
763 B
TypeScript
22 lines
763 B
TypeScript
import type { IssueChangeField } from '../../../issue/domain/entities/issue-change.js';
|
|
import { UserDto } from '../../../user/application/dto/user.dto.js';
|
|
|
|
export class IssueFieldChangeDto {
|
|
field: IssueChangeField;
|
|
oldValue: string | null;
|
|
newValue: string | null;
|
|
/** Только для field = assignee: пользователи из oldValue/newValue (null — не назначен или удалён) */
|
|
oldUser?: UserDto | null;
|
|
newUser?: UserDto | null;
|
|
}
|
|
|
|
/** Одно сохранение задачи: кто, когда и какие поля изменил */
|
|
export class IssueHistoryEntryDto {
|
|
/** changeId */
|
|
id: string;
|
|
changedAt: Date;
|
|
actorId: string | null;
|
|
actor: UserDto | null;
|
|
changes: IssueFieldChangeDto[];
|
|
}
|