import React, { useState } from "react"; // component import { CustomSelect, ToggleSwitch } from "components/ui"; import { SelectMonthModal } from "components/automation"; // icons import { ChevronDownIcon } from "@heroicons/react/24/outline"; // constants import { PROJECT_AUTOMATION_MONTHS } from "constants/project"; // types import { IProject } from "types"; type Props = { projectDetails: IProject | undefined; handleChange: (formData: Partial) => Promise; }; export const AutoArchiveAutomation: React.FC = ({ projectDetails, handleChange }) => { const [monthModal, setmonthModal] = useState(false); const initialValues: Partial = { archive_in: 1 }; return ( <> setmonthModal(false)} handleChange={handleChange} />

Auto-archive closed issues

Plane will automatically archive issues that have been completed or cancelled for the configured time period.

projectDetails?.archive_in === 0 ? handleChange({ archive_in: 1 }) : handleChange({ archive_in: 0 }) } size="sm" />
{projectDetails?.archive_in !== 0 && (
Auto-archive issues that are closed for
{ handleChange({ archive_in: val }); }} input verticalPosition="top" width="w-full" > <> {PROJECT_AUTOMATION_MONTHS.map((month) => ( {month.label} ))}
)}
); };