mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-18 00:46:45 +00:00
fix(issue): clear synced issue values on unlink #7135
This commit is contained in:
parent
e232e08925
commit
ee45bc8d35
4 changed files with 14 additions and 0 deletions
|
|
@ -1193,6 +1193,7 @@ describe('dataRepair()', () => {
|
|||
issueAttachmentNr: 1,
|
||||
issueTimeTracked: { ['2026-06-08']: 456 },
|
||||
issuePoints: 3,
|
||||
issueLastSyncedValues: { status: 'open' },
|
||||
},
|
||||
{
|
||||
...DEFAULT_TASK,
|
||||
|
|
@ -1231,6 +1232,7 @@ describe('dataRepair()', () => {
|
|||
issueAttachmentNr: undefined,
|
||||
issueTimeTracked: undefined,
|
||||
issuePoints: undefined,
|
||||
issueLastSyncedValues: undefined,
|
||||
}),
|
||||
);
|
||||
expect(result.data.task.entities.t2).toEqual(
|
||||
|
|
|
|||
|
|
@ -1047,6 +1047,7 @@ const _clearIssueProviderData = (task: TaskCopy): void => {
|
|||
task.issueAttachmentNr = undefined;
|
||||
task.issueTimeTracked = undefined;
|
||||
task.issuePoints = undefined;
|
||||
task.issueLastSyncedValues = undefined;
|
||||
};
|
||||
|
||||
const _removeNonExistentIssueProviderIdsFromTasks = (
|
||||
|
|
|
|||
|
|
@ -23,12 +23,14 @@ describe('issueProviderSharedMetaReducer', () => {
|
|||
issueId: 'issue-1',
|
||||
issueProviderId: 'provider-1',
|
||||
issueType: 'GITHUB' as any,
|
||||
issueLastSyncedValues: { status: 'open' },
|
||||
};
|
||||
testState[TASK_FEATURE_NAME].entities.task2 = {
|
||||
...testState[TASK_FEATURE_NAME].entities.task2!,
|
||||
issueId: 'issue-2',
|
||||
issueProviderId: 'provider-1',
|
||||
issueType: 'GITHUB' as any,
|
||||
issueLastSyncedValues: { status: 'closed' },
|
||||
};
|
||||
|
||||
const action = TaskSharedActions.deleteIssueProvider({
|
||||
|
|
@ -45,11 +47,13 @@ describe('issueProviderSharedMetaReducer', () => {
|
|||
issueId: undefined,
|
||||
issueProviderId: undefined,
|
||||
issueType: undefined,
|
||||
issueLastSyncedValues: undefined,
|
||||
}),
|
||||
task2: jasmine.objectContaining({
|
||||
issueId: undefined,
|
||||
issueProviderId: undefined,
|
||||
issueType: undefined,
|
||||
issueLastSyncedValues: undefined,
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
|
|
@ -121,6 +125,7 @@ describe('issueProviderSharedMetaReducer', () => {
|
|||
issueId: 'issue-1',
|
||||
issueProviderId: 'provider-1',
|
||||
issueType: 'GITHUB',
|
||||
issueLastSyncedValues: { title: 'Old title' },
|
||||
};
|
||||
testState[TASK_FEATURE_NAME].entities.task2 = {
|
||||
...testState[TASK_FEATURE_NAME].entities.task2!,
|
||||
|
|
@ -142,6 +147,7 @@ describe('issueProviderSharedMetaReducer', () => {
|
|||
issueId: undefined,
|
||||
issueProviderId: undefined,
|
||||
issueType: undefined,
|
||||
issueLastSyncedValues: undefined,
|
||||
}),
|
||||
);
|
||||
expect(updatedState[TASK_FEATURE_NAME].entities.task2).toEqual(
|
||||
|
|
@ -163,6 +169,7 @@ describe('issueProviderSharedMetaReducer', () => {
|
|||
issueId: 'issue-1',
|
||||
issueProviderId: 'provider-1',
|
||||
issueType: 'JIRA' as any,
|
||||
issueLastSyncedValues: { status: 'open' },
|
||||
};
|
||||
|
||||
const action = TaskSharedActions.deleteIssueProviders({
|
||||
|
|
@ -179,6 +186,7 @@ describe('issueProviderSharedMetaReducer', () => {
|
|||
issueId: undefined,
|
||||
issueProviderId: undefined,
|
||||
issueType: undefined,
|
||||
issueLastSyncedValues: undefined,
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
|
|
@ -197,6 +205,7 @@ describe('issueProviderSharedMetaReducer', () => {
|
|||
issueId: 'issue-1',
|
||||
issueProviderId: 'provider-1',
|
||||
issueType: 'JIRA',
|
||||
issueLastSyncedValues: { status: 'open' },
|
||||
};
|
||||
testState[TASK_FEATURE_NAME].entities.task2 = {
|
||||
...testState[TASK_FEATURE_NAME].entities.task2!,
|
||||
|
|
@ -218,6 +227,7 @@ describe('issueProviderSharedMetaReducer', () => {
|
|||
issueId: undefined,
|
||||
issueProviderId: undefined,
|
||||
issueType: undefined,
|
||||
issueLastSyncedValues: undefined,
|
||||
}),
|
||||
);
|
||||
expect(updatedState[TASK_FEATURE_NAME].entities.task2).toEqual(
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ const UNLINKED_PARTIAL_TASK: Partial<Task> = {
|
|||
issueAttachmentNr: undefined,
|
||||
issueTimeTracked: undefined,
|
||||
issuePoints: undefined,
|
||||
issueLastSyncedValues: undefined,
|
||||
} as const;
|
||||
|
||||
// =============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue