Feature #16941
closedDo not clear category on project change if category with same exists
0%
Description
Category cleared when changing project for an issue.
Steps to reproduce:
1. There is a 'project1' with category 'some' and 'project2' with the same name category.
2. Create an issue in 'project1' and select 'some' category.
3. Open edit form for this issue.
4. Select 'project2'
Expected result:
The 'project2' has a category with the same name: 'some'. And we expect that the category will be 'some'.
Actually result:
The category field is empty.
Files
Related issues
Updated by Toshi MARUYAMA over 10 years ago
"Category" is depends on project.
Category ids not same even if category names are same.
I think clearing category is expected behavior.
Updated by Toshi MARUYAMA over 10 years ago
- Related to Feature #5358: Share Issues Categories for sub-projects added
Updated by Jean-Baptiste Barth over 10 years ago
- Status changed from New to Closed
I confirm, there's no point in having a different behaviour in the general case I think. If you want persistent values across projects then you'd better use a custom field. If there's something lacking with custom field, tell us (maybe the ability to add a value from an issue for instance?). I close this issue for now.
Updated by Go MAEDA over 9 years ago
- Related to Defect #19517: Copy issue with new project added
Updated by Alexander Stehlik over 9 years ago
I guess this is a bug because Redmine behaves inconsistently here: when you edit multiple issues and change the project, categories with the same name will be preserved - see project setter for issues:
if category
self.category = project.issue_categories.find_by_name(category.name)
end
When you edit a single issue and you change the project, the category should not be cleared but should be set to a category with the same name (if available).
Updated by Alexander Stehlik over 9 years ago
- File do_not_clear_category_on_project_change-2015-06-16-master.diff do_not_clear_category_on_project_change-2015-06-16-master.diff added
Rebased the patch to current master.
Updated by Toshi MARUYAMA over 9 years ago
- Status changed from Closed to New
- Target version set to 3.2.0
Updated by Jean-Philippe Lang about 9 years ago
- Tracker changed from Patch to Feature
- Subject changed from Do not clear category on project change to Do not clear category on project change if category with same exists
- Status changed from New to Closed
- Assignee set to Jean-Philippe Lang
- Resolution set to Fixed
This is fixed in r14715. Slightly different fix, and test added.
Thanks for pointing this out.