-
Notifications
You must be signed in to change notification settings - Fork 36
ARR: Add additional submission query params #2996
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
base: master
Are you sure you want to change the base?
Changes from 11 commits
f0742b8
1c20b2b
d3a16bd
4367d92
a671399
0243c84
2713a84
11eb038
12b6d48
8e483b8
3e5aaa7
227f674
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -128,6 +128,182 @@ return { | |
| return hasReply; | ||
| }) | ||
| return metaReviewReplies?.length??0; | ||
| `, | ||
| reviewerEmergencyDeclarationCount: ` | ||
| const replies = row.note?.details?.replies ?? []; | ||
| const reviewers = row.reviewers ?? []; | ||
| const signatureToReviewerIndex = new Map(); | ||
| const reviewersWithEmergencyDeclaration = new Set(); | ||
|
|
||
| reviewers.forEach((reviewer, reviewerIndex) => { | ||
| if (reviewer?.anonymizedGroup) { | ||
| signatureToReviewerIndex.set(reviewer.anonymizedGroup, reviewerIndex); | ||
| } | ||
| if (reviewer?.preferredId) { | ||
| signatureToReviewerIndex.set(reviewer.preferredId, reviewerIndex); | ||
| } | ||
| }); | ||
|
|
||
| replies.forEach(reply => { | ||
| const replySignature = reply?.signatures?.[0]; | ||
| const isEmergencyDeclaration = (reply?.invitations ?? []).some(invitation => invitation.includes('Emergency_Declaration')); | ||
|
|
||
| if (!isEmergencyDeclaration || !signatureToReviewerIndex.has(replySignature)) { | ||
| return; | ||
| } | ||
|
|
||
| reviewersWithEmergencyDeclaration.add(signatureToReviewerIndex.get(replySignature)); | ||
| }); | ||
|
|
||
| return reviewersWithEmergencyDeclaration.size; | ||
| `, | ||
| areaChairEmergencyDeclarationCount: ` | ||
| const replies = row.note?.details?.replies ?? []; | ||
| const areaChairs = row.metaReviewData?.areaChairs ?? []; | ||
| const signatureToAreaChairIndex = new Map(); | ||
| const areaChairsWithEmergencyDeclaration = new Set(); | ||
|
|
||
| areaChairs.forEach((areaChair, areaChairIndex) => { | ||
| if (areaChair?.anonymizedGroup) { | ||
| signatureToAreaChairIndex.set(areaChair.anonymizedGroup, areaChairIndex); | ||
| } | ||
| if (areaChair?.preferredId) { | ||
| signatureToAreaChairIndex.set(areaChair.preferredId, areaChairIndex); | ||
| } | ||
| }); | ||
|
|
||
| replies.forEach(reply => { | ||
| const replySignature = reply?.signatures?.[0]; | ||
| const isEmergencyDeclaration = (reply?.invitations ?? []).some(invitation => invitation.includes('Emergency_Declaration')); | ||
|
|
||
| if (!isEmergencyDeclaration || !signatureToAreaChairIndex.has(replySignature)) { | ||
| return; | ||
| } | ||
|
|
||
| areaChairsWithEmergencyDeclaration.add(signatureToAreaChairIndex.get(replySignature)); | ||
| }); | ||
|
|
||
| return areaChairsWithEmergencyDeclaration.size; | ||
| `, | ||
| reviewerDelayNotificationCount: ` | ||
| const replies = row.note?.details?.replies ?? []; | ||
| const reviewers = row.reviewers ?? []; | ||
| const signatureToReviewerIndex = new Map(); | ||
| const reviewersWithDelayNotification = new Set(); | ||
|
|
||
| reviewers.forEach((reviewer, reviewerIndex) => { | ||
| if (reviewer?.anonymizedGroup) { | ||
| signatureToReviewerIndex.set(reviewer.anonymizedGroup, reviewerIndex); | ||
| } | ||
| if (reviewer?.preferredId) { | ||
| signatureToReviewerIndex.set(reviewer.preferredId, reviewerIndex); | ||
| } | ||
| }); | ||
|
|
||
| replies.forEach(reply => { | ||
| const replySignature = reply?.signatures?.[0]; | ||
| const isDelayNotification = (reply?.invitations ?? []).some(invitation => invitation.includes('Delay_Notification')); | ||
|
|
||
| if (!isDelayNotification || !signatureToReviewerIndex.has(replySignature)) { | ||
| return; | ||
| } | ||
|
|
||
| reviewersWithDelayNotification.add(signatureToReviewerIndex.get(replySignature)); | ||
| }); | ||
|
|
||
| return reviewersWithDelayNotification.size; | ||
| `, | ||
| areaChairDelayNotificationCount: ` | ||
| const replies = row.note?.details?.replies ?? []; | ||
| const areaChairs = row.metaReviewData?.areaChairs ?? []; | ||
| const signatureToAreaChairIndex = new Map(); | ||
| const areaChairsWithDelayNotification = new Set(); | ||
|
|
||
| areaChairs.forEach((areaChair, areaChairIndex) => { | ||
| if (areaChair?.anonymizedGroup) { | ||
| signatureToAreaChairIndex.set(areaChair.anonymizedGroup, areaChairIndex); | ||
| } | ||
| if (areaChair?.preferredId) { | ||
| signatureToAreaChairIndex.set(areaChair.preferredId, areaChairIndex); | ||
| } | ||
| }); | ||
|
|
||
| replies.forEach(reply => { | ||
| const replySignature = reply?.signatures?.[0]; | ||
| const isDelayNotification = (reply?.invitations ?? []).some(invitation => invitation.includes('Delay_Notification')); | ||
|
|
||
| if (!isDelayNotification || !signatureToAreaChairIndex.has(replySignature)) { | ||
| return; | ||
| } | ||
|
|
||
| areaChairsWithDelayNotification.add(signatureToAreaChairIndex.get(replySignature)); | ||
| }); | ||
|
|
||
| return areaChairsWithDelayNotification.size; | ||
| `, | ||
| assignedReviewersAfterEmergencyDeclarationsCount: ` | ||
| const replies = row.note?.details?.replies ?? []; | ||
| const reviewers = row.reviewers ?? []; | ||
| const signatureToReviewerIndex = new Map(); | ||
| const reviewersWithEmergencyDeclaration = new Set(); | ||
|
|
||
| reviewers.forEach((reviewer, reviewerIndex) => { | ||
| if (reviewer?.anonymizedGroup) { | ||
| signatureToReviewerIndex.set(reviewer.anonymizedGroup, reviewerIndex); | ||
| } | ||
| if (reviewer?.preferredId) { | ||
| signatureToReviewerIndex.set(reviewer.preferredId, reviewerIndex); | ||
| } | ||
| }); | ||
|
|
||
| replies.forEach(reply => { | ||
| const replySignature = reply?.signatures?.[0]; | ||
| const isEmergencyDeclaration = (reply?.invitations ?? []).some(invitation => invitation.includes('Emergency_Declaration')); | ||
|
|
||
| if (!isEmergencyDeclaration || !signatureToReviewerIndex.has(replySignature)) { | ||
| return; | ||
| } | ||
|
|
||
| reviewersWithEmergencyDeclaration.add(signatureToReviewerIndex.get(replySignature)); | ||
| }); | ||
|
|
||
| return Math.max(0, reviewers.length - reviewersWithEmergencyDeclaration.size); | ||
| `, | ||
|
||
| completedReviewsOrDelayNotificationsCount: ` | ||
| const replies = row.note?.details?.replies ?? []; | ||
| const reviewers = row.reviewers ?? []; | ||
| const officialReviews = row.officialReviews ?? []; | ||
| const signatureToReviewerIndex = new Map(); | ||
| const reviewersWithDelayNotification = new Set(); | ||
| const reviewersWithOfficialReview = new Set( | ||
| officialReviews | ||
| .map(review => review?.anonymousId) | ||
| .filter(Boolean) | ||
| ); | ||
|
|
||
| reviewers.forEach((reviewer, reviewerIndex) => { | ||
| if (reviewer?.anonymizedGroup) { | ||
| signatureToReviewerIndex.set(reviewer.anonymizedGroup, reviewerIndex); | ||
| } | ||
| if (reviewer?.preferredId) { | ||
| signatureToReviewerIndex.set(reviewer.preferredId, reviewerIndex); | ||
| } | ||
| }); | ||
|
|
||
| replies.forEach(reply => { | ||
| const replySignature = reply?.signatures?.[0]; | ||
| const isDelayNotification = (reply?.invitations ?? []).some(invitation => invitation.includes('Delay_Notification')); | ||
|
|
||
| if (!isDelayNotification || !signatureToReviewerIndex.has(replySignature)) { | ||
| return; | ||
| } | ||
|
|
||
| reviewersWithDelayNotification.add(signatureToReviewerIndex.get(replySignature)); | ||
| }); | ||
|
|
||
| return reviewers.filter((reviewer, reviewerIndex) => { | ||
| return reviewersWithOfficialReview.has(reviewer?.anonymousId) || reviewersWithDelayNotification.has(reviewerIndex); | ||
| }).length; | ||
|
||
| ` | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
completedReviewsPlusDelayNotificationsCountimplementation counts unique assigned reviewers who either submitted an official review OR submitted a delay notification (it does not add the two counts, and it won’t double-count a reviewer who did both). This behavior doesn’t match the PR description wording (“plus”), and thePlusname is misleading given the OR/union semantics. Consider either renaming to reflect OR/union semantics (and aligning with the SAC console param name), or adjusting the computation if a true sum is required.