Project

General

Profile

Actions

Defect #44768

closed

"Private by default" tracker setting overrides an explicitly specified public flag and the private flag of copied issues

Defect #44768: "Private by default" tracker setting overrides an explicitly specified public flag and the private flag of copied issues

Added by Takenori TAKAKI 16 days ago. Updated 9 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Issues
Target version:
Resolution:
Fixed
Affected version:

Description

When "Private by default" (added in #9432) is enabled for a tracker, new issues on that tracker become private even when "public" is specified explicitly or the source issue of a copy is public.

Steps to reproduce

  1. In Administration > Trackers, enable "Private by default" for a tracker.
  2. Use an account that has the "Set issues public or private" permission.
  3. Create or copy an issue on that tracker in one of the following ways:
    • Send an email with Private: No in the body.
    • Import a CSV file whose private column is no.
    • Bulk copy public issues, leaving "Private" as "(No change)".
    • Copy a public issue from the issue page.

Actual behavior

  • Email, CSV import, and bulk copy: the created issues are private.
  • Copy: the "Private" checkbox is checked on the new issue form, although the source issue is public.

Expected behavior

The tracker setting should only be a default for issues where the private flag is not specified.

  • An explicit Private: No in an email and no in a CSV file should create a public issue.
  • Copying an issue (single or bulk with "(No change)") should keep the private flag of the source issue.

Creating an issue via the REST API without is_private still creates a private issue, which is the intended behavior.

Environment

  • Redmine version: trunk r25469

Patch

I have attached three patches. Please apply them in order.

  • 0001-fix-private-no-mail-keyword_r25469.patch: Makes the Private: No keyword in incoming emails work. It has been ignored since the keyword was added in #31324. With this patch, replying with Private: No also makes a private issue public, if the user is allowed to change the private flag.
  • 0002-keep-explicit-public-flag-with-private-by-default_r25469.patch: Keeps an explicitly specified public flag for incoming emails and CSV import.
  • 0003-keep-private-flag-when-copying-issues_r25469.patch: Keeps the private flag of the source issue when copying issues.

Files


Related issues 1 (0 open — 1 closed)

Related to Redmine - Feature #9432: Default value for the private issue flagClosedGo MAEDAActions

Updated by Takenori TAKAKI 16 days ago Actions #1

After re-reading #9432, I understand that "Private by default" is meant to prevent issues from being created as public by mistake. A copied issue is also a new issue on that tracker, so it should follow the setting too.

The current copy behavior is therefore correct, and I would like to withdraw 0003-keep-private-flag-when-copying-issues_r25469.patch. 0001 and 0002 can still be applied without it.

Updated by Go MAEDA 11 days ago Actions #2

  • Related to Feature #9432: Default value for the private issue flag added

Updated by Go MAEDA 11 days ago Actions #3

  • Status changed from New to Resolved
  • Assignee set to Go MAEDA
  • Target version set to 7.0.4
  • Resolution set to Fixed

Committed the first two patches in r25480 and r25481. Thank you for reporting the problem and providing the patches.

I agree that 0003-keep-private-flag-when-copying-issues_r25469.patch should not be committed. Copying an issue is a feature that helps users create a new issue. Therefore, when users create an issue with a tracker that has "Private by default" enabled, they will expect the new issue to be private, even if the source issue is public. If the copied issue kept the private flag of the source issue, an issue that should be private could be created as public by mistake. This is the problem that "Private by default" is meant to prevent.

Users can still create a public copy if they want to. When copying a single issue, they can clear the "Private" checkbox on the new issue form. When copying multiple issues, they can select "No" for "Private".

Updated by Go MAEDA 9 days ago Actions #4

  • Status changed from Resolved to Closed

Merged the fixes into 7.0-stable branch in r25485 and r25486.

Actions

Also available in: PDF Atom