Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from royallsilwallz/fix/6115-incomplete-contri…
Browse files Browse the repository at this point in the history
…butor-list

fix/6115 incomplete contributor list
royallsilwallz authored Nov 2, 2023
2 parents 9bf58ef + 49ebda1 commit ba1b7fe
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions frontend/src/components/taskSelection/actionSidebars.js
Original file line number Diff line number Diff line change
@@ -586,19 +586,12 @@ const TaskValidationSelector = ({
// the contributors is filled only on the case of single task validation,
// so we need to fetch the task history in the case of multiple task validation
useEffect(() => {
if (showCommentInput && isValidatingMultipleTasks && !contributors.length) {
if (showCommentInput && isValidatingMultipleTasks) {
fetchLocalJSONAPI(`projects/${projectId}/tasks/${id}/`).then((response) =>
setContributorsList(getTaskContributors(response.taskHistory, userDetails.username)),
);
}
}, [
isValidatingMultipleTasks,
showCommentInput,
contributors,
id,
projectId,
userDetails.username,
]);
}, [isValidatingMultipleTasks, showCommentInput, id, projectId, userDetails.username]);

return (
<div className="cf w-100 db pt1 pv2 blue-dark">
@@ -650,7 +643,7 @@ const TaskValidationSelector = ({
<CommentInputField
comment={comment}
setComment={setComment}
contributors={contributors.length ? contributors : contributorsList}
contributors={isValidatingMultipleTasks ? contributorsList : contributors}
enableHashtagPaste
enableContributorsHashtag
isShowTabNavs

0 comments on commit ba1b7fe

Please sign in to comment.