generated from ttipo/project-base
fix(backend): KOPIS 에 일정변경으로 다시 등록된 같은 공연을 하나로 합침
CI / Backend (lint · test · e2e · build) (pull_request) Successful in 12m7s
CI / Frontend (lint · type-check · test) (pull_request) Successful in 10m52s
CI / 에러 코드 SSOT 동기화 검사 (pull_request) Successful in 11m21s
CI / Frontend (lint · type-check · test) (push) Has been cancelled
CI / 에러 코드 SSOT 동기화 검사 (push) Has been cancelled
CI / Backend (lint · test · e2e · build) (push) Has been cancelled
CI / Backend (lint · test · e2e · build) (pull_request) Successful in 12m7s
CI / Frontend (lint · type-check · test) (pull_request) Successful in 10m52s
CI / 에러 코드 SSOT 동기화 검사 (pull_request) Successful in 11m21s
CI / Frontend (lint · type-check · test) (push) Has been cancelled
CI / 에러 코드 SSOT 동기화 검사 (push) Has been cancelled
CI / Backend (lint · test · e2e · build) (push) Has been cancelled
KOPIS 는 일정이 바뀐 공연 제목에 "[일정변경]" 을 붙이고 새 id 로 다시 등록한다. 그래서 같은 공연장·같은 날
같은 공연이 두 번 보였다(2026-11-04 회귀 점검: 고령 남진 콘서트).
- 제목 앞의 "[일정변경]" 은 뗀다(화면에는 바뀐 날짜가 이미 보인다)
- 같은 공연장·같은 기간·같은 제목이면 먼저 등록된 것만 남기고 나머지는 숨긴다
문화포털 전시에 쓰는 "제목 6글자 이상 겹침" 기준은 공연에 쓰지 않는다. 처음 적용했을 때 음악제 이름을 앞에 붙인
같은 날 다른 공연("포항국제음악제, …" 두 공연)을 합쳐 버려서, 제목이 같을 때만 합치게 했다.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit was merged in pull request #6.
This commit is contained in:
@@ -232,4 +232,40 @@ describe('KOPIS 공연 동기화 (e2e)', () => {
|
||||
expect((await event('PFE2E2')).status).toBe('hidden');
|
||||
expect((await event('PFE2E1')).status).toBe('active');
|
||||
});
|
||||
|
||||
// 2026-11-04 회귀 점검: "[일정변경] 데뷔 60주년 기념공연 …" 이 원래 공연과 함께 두 번 보였다
|
||||
it('일정이 바뀌어 새 id 로 다시 등록된 같은 공연은 먼저 등록된 것만 남기고 나머지는 숨긴다', async () => {
|
||||
const renamed = '[일정변경] 시험 공연 PFE2E1';
|
||||
// 이전 실행에서 이미 들어온 중복(중복 제거 전에 저장된 데이터)
|
||||
await ds.getRepository(FestivalEvent).save({
|
||||
source: 'kopis',
|
||||
sourceId: 'PFE2E5',
|
||||
kind: 'performance',
|
||||
name: renamed,
|
||||
startDate: kstDateString(new Date(), 0),
|
||||
endDate: kstDateString(new Date(), 5),
|
||||
eventPlace: '시험극장',
|
||||
ldongRegnCd: REGION,
|
||||
status: 'active',
|
||||
});
|
||||
fake.list = [
|
||||
listItem('PFE2E1'),
|
||||
listItem('PFE2E5', { prfnm: renamed }),
|
||||
// 같은 날 같은 공연장의 다른 공연 — 앞의 행사 이름만 같으면 합치지 않는다(포항국제음악제 사례)
|
||||
listItem('PFE2E6', { prfnm: '시험 공연 PFE2E1, 아티스트 시리즈 Ⅱ' }),
|
||||
];
|
||||
fake.changed = [];
|
||||
|
||||
const result = await sync.run({ regionCode: REGION });
|
||||
|
||||
expect(result).toMatchObject({
|
||||
updated: 1,
|
||||
inserted: 1,
|
||||
hidden: 1,
|
||||
skipped: { duplicate_same_source: 1 },
|
||||
});
|
||||
expect((await event('PFE2E1')).status).toBe('active');
|
||||
expect((await event('PFE2E5')).status).toBe('hidden');
|
||||
expect((await event('PFE2E6')).status).toBe('active');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user