Defect #44768
open"Private by default" tracker setting overrides an explicitly specified public flag and the private flag of copied issues
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¶
- In Administration > Trackers, enable "Private by default" for a tracker.
- Use an account that has the "Set issues public or private" permission.
- Create or copy an issue on that tracker in one of the following ways:
- Send an email with
Private: Noin 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.
- Send an email with
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: Noin an email andnoin 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 thePrivate: Nokeyword in incoming emails work. It has been ignored since the keyword was added in #31324. With this patch, replying withPrivate: Noalso 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
Updated by Takenori TAKAKI about 18 hours ago
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.