Add issue resolution confirmation workflow
This commit is contained in:
@@ -41,6 +41,7 @@ const SECTION_LABELS: Record<string, string> = {
|
||||
logs: 'Activity log',
|
||||
maintenance: 'Maintenance',
|
||||
requests: 'Request pipeline',
|
||||
'issue-workflow': 'Issue workflow',
|
||||
site: 'Site & login',
|
||||
}
|
||||
|
||||
@@ -95,6 +96,8 @@ const NUMBER_SETTINGS = new Set([
|
||||
'requests_poll_interval_seconds',
|
||||
'requests_delta_sync_interval_minutes',
|
||||
'requests_cleanup_days',
|
||||
'issue_confirmation_contact_attempts',
|
||||
'issue_confirmation_interval_value',
|
||||
])
|
||||
const BANNER_TONES = ['info', 'warning', 'error', 'maintenance']
|
||||
|
||||
@@ -115,6 +118,7 @@ const SECTION_DESCRIPTIONS: Record<string, string> = {
|
||||
prowlarr: 'Prowlarr connection used by Sonarr and Radarr for release searches.',
|
||||
qbittorrent: 'qBittorrent connection used for collector-owned download progress and diagnostics.',
|
||||
requests: 'Control how often requests are refreshed and cleaned up.',
|
||||
'issue-workflow': 'Control reporter confirmation, reminder timing, and automatic issue closure.',
|
||||
logs: 'Control log output and inspect recent application activity for troubleshooting.',
|
||||
maintenance: 'Repair cached data, clean historical records, and run recovery operations.',
|
||||
site: 'Sitewide banner, login page visibility, and version details. The changelog is generated from git history during release builds.',
|
||||
@@ -133,6 +137,7 @@ const SETTINGS_SECTION_MAP: Record<string, string | null> = {
|
||||
prowlarr: 'prowlarr',
|
||||
qbittorrent: 'qbittorrent',
|
||||
requests: 'requests',
|
||||
'issue-workflow': 'issue',
|
||||
cache: null,
|
||||
logs: 'log',
|
||||
maintenance: null,
|
||||
@@ -390,6 +395,18 @@ const STANDARD_SECTION_GROUPS: Record<
|
||||
keys: ['requests_cleanup_time', 'requests_cleanup_days'],
|
||||
},
|
||||
],
|
||||
'issue-workflow': [
|
||||
{
|
||||
key: 'issues-resolution-confirmation',
|
||||
title: 'Resolution confirmation',
|
||||
description: 'Choose how often Magent asks a reporter to confirm a fix before the issue is closed automatically.',
|
||||
keys: [
|
||||
'issue_confirmation_contact_attempts',
|
||||
'issue_confirmation_interval_value',
|
||||
'issue_confirmation_interval_unit',
|
||||
],
|
||||
},
|
||||
],
|
||||
logs: [
|
||||
{
|
||||
key: 'logs-output',
|
||||
@@ -413,6 +430,9 @@ const STANDARD_SECTION_GROUPS: Record<
|
||||
}
|
||||
|
||||
const SETTING_LABEL_OVERRIDES: Record<string, string> = {
|
||||
issue_confirmation_contact_attempts: 'Confirmation emails before auto-close',
|
||||
issue_confirmation_interval_value: 'Confirmation interval',
|
||||
issue_confirmation_interval_unit: 'Interval unit',
|
||||
jellyseerr_base_url: 'Seerr base URL',
|
||||
jellyseerr_api_key: 'Seerr API key',
|
||||
magent_application_url: 'Application URL',
|
||||
@@ -896,6 +916,12 @@ export default function SettingsPage({ section }: SettingsPageProps) {
|
||||
}, [artworkPrefetch])
|
||||
|
||||
const settingDescriptions: Record<string, string> = {
|
||||
issue_confirmation_contact_attempts:
|
||||
'Number of confirmation emails sent after an issue is marked fixed. Set 0 to send none and close immediately.',
|
||||
issue_confirmation_interval_value:
|
||||
'Amount of time between confirmation emails, and the final waiting period before automatic closure.',
|
||||
issue_confirmation_interval_unit:
|
||||
'Unit used for the confirmation interval: days, weeks, or months.',
|
||||
magent_application_url:
|
||||
'Canonical public URL for the Magent web app (used for links and reverse-proxy-aware features).',
|
||||
magent_application_port:
|
||||
@@ -2404,7 +2430,8 @@ export default function SettingsPage({ section }: SettingsPageProps) {
|
||||
<input
|
||||
name={setting.key}
|
||||
type="number"
|
||||
min={1}
|
||||
min={setting.key === 'issue_confirmation_contact_attempts' ? 0 : 1}
|
||||
max={setting.key === 'issue_confirmation_contact_attempts' ? 10 : setting.key === 'issue_confirmation_interval_value' ? 365 : undefined}
|
||||
step={1}
|
||||
value={value}
|
||||
onChange={(event) =>
|
||||
@@ -2417,6 +2444,32 @@ export default function SettingsPage({ section }: SettingsPageProps) {
|
||||
</label>
|
||||
)
|
||||
}
|
||||
if (setting.key === 'issue_confirmation_interval_unit') {
|
||||
return (
|
||||
<label key={setting.key} data-helper={helperText || undefined}>
|
||||
<span className="label-row">
|
||||
<span>{labelFromKey(setting.key)}</span>
|
||||
<span className="meta">
|
||||
{setting.isSet ? `Source: ${setting.source}` : 'Not set'}
|
||||
</span>
|
||||
</span>
|
||||
<select
|
||||
name={setting.key}
|
||||
value={value || 'days'}
|
||||
onChange={(event) =>
|
||||
setFormValues((current) => ({
|
||||
...current,
|
||||
[setting.key]: event.target.value,
|
||||
}))
|
||||
}
|
||||
>
|
||||
<option value="days">Days</option>
|
||||
<option value="weeks">Weeks</option>
|
||||
<option value="months">Months</option>
|
||||
</select>
|
||||
</label>
|
||||
)
|
||||
}
|
||||
if (setting.key === 'requests_data_source') {
|
||||
return (
|
||||
<label key={setting.key} data-helper={helperText || undefined}>
|
||||
|
||||
Reference in New Issue
Block a user