mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-09 09:23:51 +00:00
V3 project migration (#1652)
* migrate settings * migrate viewsettings * migrate url preset * migrate project data * migrate custom fields * migrate automations * migrate rundown * lint * return custom field translation table * check regex * new url type * refactor * migrate old OSC subscriptions * migrate old http subscriptions * update comments * migrate the whole db * remove automation logging unlis there is an error * return a new object * refactor: copy currup is only used in one place * make a copy of original migrated file * refactor: ensure image flder is part of project service init * add entrys to groups * small cleanup * just drop incorrect custom fields in the default data parser
This commit is contained in:
committed by
GitHub
parent
35347e8d63
commit
9ebb3decdb
@@ -14,7 +14,7 @@ describe('parseCustomFields()', () => {
|
||||
const errorEmitter = vi.fn();
|
||||
// @ts-expect-error -- data is external, we check bad types
|
||||
const customFields = {
|
||||
1: { label: 'test', type: 'text', colour: 'red' }, // ok
|
||||
test: { label: 'test', type: 'text', colour: 'red' }, // ok
|
||||
2: { label: 'test', type: 'text' }, // duplicate label
|
||||
3: { label: '', type: 'text' }, // missing colour
|
||||
4: { type: 'text', colour: '' }, // missing label
|
||||
@@ -88,9 +88,10 @@ describe('sanitiseCustomFields()', () => {
|
||||
expect(sanitationResult).toStrictEqual(expectedCustomFields);
|
||||
});
|
||||
|
||||
it('enforce name cohesion', () => {
|
||||
it('drop incorrect name/key pairs', () => {
|
||||
const customFields: CustomFields = {
|
||||
test: { label: 'NewName', type: 'text', colour: 'red' },
|
||||
NewName: { label: 'NewName', type: 'text', colour: 'red' },
|
||||
willBeGone: { label: 'BadName', type: 'text', colour: 'red' },
|
||||
};
|
||||
const expectedCustomFields: CustomFields = {
|
||||
NewName: { label: 'NewName', type: 'text', colour: 'red' },
|
||||
|
||||
Reference in New Issue
Block a user