Your evaluation will be made public and given a DOI, but you have the option to{" "}
@@ -206,7 +208,13 @@ export const Respond = (props: Props) => {
const submissionUrl = props.pub.values["unjournal:url"] as string;
const submissionTitle = props.pub.values[props.instanceConfig.titleFieldSlug] as string;
const submissionAbstract = props.pub.values["unjournal:description"] as string;
-
+ const deadline = calculateDeadline(
+ {
+ deadlineLength: props.instanceConfig.deadlineLength,
+ deadlineUnit: props.instanceConfig.deadlineUnit,
+ },
+ new Date(Date.now())
+ );
if (props.intent === "decline") {
const params = new URLSearchParams(window.location.search);
params.set("intent", "info");
@@ -280,12 +288,18 @@ export const Respond = (props: Props) => {
<>
Confirm
- We encourage reviewers to complete reviews in three weeks. Upon accepting
- this invitation, your evaluation will be due roughly on{" "}
+ We strongly encourage evaluators to complete evaluations relatively quickly,
+ for the benefit of authors, research-users, and the evaluation ecosystem. If
+ you submit the evaluation within that window (by{" "}
- {new Date(Date.now() + 21 * (1000 * 60 * 60 * 24)).toLocaleDateString()}
+ {new Date(
+ deadline.getTime() - 21 * (1000 * 60 * 60 * 24)
+ ).toLocaleDateString()}
- .
+ ), you will receive a $100 “prompt evaluation bonus.” After{" "}
+ {new Date(deadline.getTime()).toLocaleDateString()}, we
+ will consider re-assigning the evaluation, and later submissions may not be
+ eligible for the full baseline compensation.
- To agree to take on this assignment, please click the 'Accept' button below.
- If you have questions at this point, please select Contact Evaluation
- Manager. If you will not be able to accept our invitation, please choose
- 'Decline' below.
+ To agree to take on this assignment, please click the ‘Accept’ button below.
+ If you have questions at this point, please select ‘Contact Evaluation
+ Manager’. If you cannot accept our invitation, please choose ‘Decline’
+ below. We strongly encourage evaluators to complete evaluations relatively
+ quickly, for the benefit of authors, research-users, and the evaluation
+ ecosystem. If you submit the evaluation within that window (by{" "}
+
+ {new Date(
+ deadline.getTime() - 21 * (1000 * 60 * 60 * 24)
+ ).toLocaleDateString()}
+
+ ), you will receive a $100 “prompt evaluation bonus.” After{" "}
+ {new Date(deadline.getTime()).toLocaleDateString()}, we
+ will consider re-assigning the evaluation, and later submissions may not be
+ eligible for the full baseline compensation.
diff --git a/integrations/evaluations/app/configure/configure.tsx b/integrations/evaluations/app/configure/configure.tsx
index e34c9f11b..c9d442ba8 100644
--- a/integrations/evaluations/app/configure/configure.tsx
+++ b/integrations/evaluations/app/configure/configure.tsx
@@ -19,6 +19,11 @@ import {
FormMessage,
Icon,
Input,
+ Select,
+ SelectContent,
+ SelectItem,
+ SelectTrigger,
+ SelectValue,
Textarea,
useToast,
} from "ui";
@@ -51,6 +56,9 @@ const schema: z.ZodType = z.object({
subject: z.string(),
message: z.string(),
}),
+ // coerce is used here to assert this field is a number, otherwise a vlaidation error will be thrown saying this is a string
+ deadlineLength: z.coerce.number().min(35),
+ deadlineUnit: z.enum(["days", "months"]),
});
const isActionRedirect = (props: Props): props is RedirectProps => {
@@ -62,17 +70,19 @@ const defaultEmailTemplate = {
message: "Please reach out if you have any questions.",
};
-const defaultInstanceConfig = {
+const defaultFormValues: InstanceConfig = {
pubTypeId: "",
evaluatorFieldSlug: "",
titleFieldSlug: "",
- template: defaultEmailTemplate,
+ emailTemplate: defaultEmailTemplate,
+ deadlineLength: 35,
+ deadlineUnit: "days",
};
export function Configure(props: Props) {
const { toast } = useToast();
const defaultValues = useMemo(
- () => Object.assign({}, defaultInstanceConfig, props.instanceConfig),
+ () => Object.assign({}, defaultFormValues, props.instanceConfig),
[]
);
const form = useForm>({
@@ -166,6 +176,53 @@ export function Configure(props: Props) {
)}
/>
+
+ Deadline
+
+ (
+
+ Deadline length
+
+
+
+
+ This field is used to determine thhe length of the deadline.
+
+
+
+ )}
+ />
+ (
+
+ Deadline Format
+
+
+ This field allows you to select whether the deadline is in
+ days or months.
+
+
+
+ )}
+ />
+ We strongly encourage evaluators to complete evaluations relatively quickly, for the
+ benefit of authors, research-users, and the evaluation ecosystem. If you submit the
+ evaluation within that window (by{" "}
+ {new Date(deadline.getTime() - 21 * (1000 * 60 * 60 * 24)).toLocaleDateString()} ),
+ you will receive a $100 “prompt evaluation bonus.” After{" "}
+ {deadline.toLocaleDateString()}, we will consider re-assigning the evaluation, and
+ later submissions may not be eligible for the full baseline compensation.
+
About our evaluation process
As a sign that we{" "}
diff --git a/integrations/evaluations/lib/emails.ts b/integrations/evaluations/lib/emails.ts
index d5bd7b78d..309835b89 100644
--- a/integrations/evaluations/lib/emails.ts
+++ b/integrations/evaluations/lib/emails.ts
@@ -8,7 +8,26 @@ import {
const DAYS_TO_ACCEPT_INVITE = 10;
const DAYS_TO_REMIND_EVALUATOR = 5;
-const DAYS_TO_SUBMIT_EVALUATION = 21;
+
+/**
+ * Reaturns a new date object with the deadline calculated based on the deadlineLength and deadlineUnit.
+ * @param deadline
+ * @param date
+ * @returns Date
+ */
+export function calculateDeadline(
+ deadline: Pick,
+ date: Date
+): Date {
+ switch (deadline.deadlineUnit) {
+ case "days":
+ return new Date(date.setMinutes(date.getMinutes() + deadline.deadlineLength * 24 * 60));
+ case "months":
+ return new Date(date.setMonth(date.getMonth() + deadline.deadlineLength));
+ default:
+ throw new Error('Invalid time unit. Use "days", "weeks", or "months".');
+ }
+}
const notificationFooter =
'
This is an automated email sent from Unjournal. Please contact contact@unjournal.org with any questions.
Thank you for agreeing to evaluate "{{pubs.submission.values["${instanceConfig.titleFieldSlug}"]}}" for The Unjournal. Please submit your evaluation and ratings using {{extra.evaluate_link}}. The form includes general instructions as well as (potentially) specific considerations for this research and particular issues and priorities for this evaluation.
-
Please aim to submit your completed evaluation by {{extra.due_at}}. If you have any questions, do not hesitate to reach out to me at {{users.invitor.email}}.
-
Once your evaluation has been submitted and reviewed, we will follow up with details about payment and next steps.
-
Thank you again for your important contribution to the future of science.
Thank you for agreeing to evaluate "{{pubs.submission.values["${
+ instanceConfig.titleFieldSlug
+ }"]}}" for The Unjournal. Please submit your evaluation and ratings using {{extra.evaluate_link}}. The form includes general instructions as well as (potentially) specific considerations for this research and particular issues and priorities for this evaluation.
+
We strongly encourage evaluators to complete evaluations within three weeks; relatively quick turnaround is an important part of The Unjournal model, for the benefit of authors, research-users, and the evaluation ecosystem. If you submit the evaluation within that window (by ${new Date(
+ evaluator.deadline.getTime() - 21 * (1000 * 60 * 60 * 24)
+ ).toLocaleDateString()}), you will receive a $100 “prompt evaluation bonus.” After ${new Date(
+ evaluator.deadline.getTime()
+ ).toLocaleDateString()}, we will consider re-assigning the evaluation, and later submissions may not be eligible for the full baseline compensation.