Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the conditional completed and additionalInfo attribute for dispute task. #4473

Merged
merged 3 commits into from
Jul 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion changelog/fix-4123-dispute-count
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Significance: patch
Type: fix

Correctly show the number of disputes that need to be responded in task list.
Show the correct number of disputes needing a response in the Payments > Overview task list.
7 changes: 2 additions & 5 deletions client/overview/task-list/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,8 @@ export const getTasks = ( {
),
numDisputesNeedingResponse
),
additionalInfo:
0 < numDisputesNeedingResponse
? __( 'View and respond', 'woocommerce-payments' )
: '',
completed: 0 === numDisputesNeedingResponse,
additionalInfo: __( 'View and respond', 'woocommerce-payments' ),
completed: false,
isDeletable: true,
isDismissable: true,
allowSnooze: true,
Expand Down
2 changes: 2 additions & 0 deletions client/overview/task-list/test/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ describe( 'getTasks()', () => {
completed: false,
level: 3,
title: '1 disputed payment needs your response',
additionalInfo: 'View and respond',
} ),
] )
);
Expand All @@ -201,6 +202,7 @@ describe( 'getTasks()', () => {
completed: false,
level: 3,
title: '2000 disputed payments need your response',
additionalInfo: 'View and respond',
} ),
] )
);
Expand Down