Subject: auto-unarchive

From: Glenn Morris <[email-masked]>
Date: Thu, 14 Apr 2022 11:36:55 -0400

Package: debbugs.gnu.org
Severity: wishlist

If you mail an archived bug, you get an automatic reply that explains
the bug is archived, and how to unarchive it. Based on
/usr/share/debbugs/templates/en_US/mail/process_archived_bug.tmpl

Some people don't like this. Ref eg:
https://debbugs.gnu.org/27933#52
https://lists.gnu.org/r/emacs-devel/2021-08/msg01274.html

As stated in
https://lists.gnu.org/r/emacs-devel/2021-08/msg01596.html
  "archiving is important for performance reasons."

Automatic unarchiving is probably fairly straightforward to achieve.

Modify /usr/lib/debbugs/process around line 367:

        if ($data->{archived}) {
           $badtemplate = 'mail/process_archived_bug';
           $badsubj = 'Archived';
        }

so that instead of going on to send a message, it unarchives,
as /usr/lib/debbugs/service does at line 1235:
         eval {
              bug_unarchive(@common_control_options,
                            bug        => $ref,
                            recipients => \%recipients,
                           );
         };

then assuming that succeeds, continues on with normal operation.