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

Auto-archive closed issues

Plane will auto archive issues that have been completed or canceled.

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