task #18
closedRecurring issue does not inherit all settings from original
Description
Thank you for your great work.
I've discovered that e.g. Parent task is not inherited/copied to the new task.
Tasks:- keep parent Issue reference on new recurrence of base issue and its subtasks
- add tests to check that attributes are
- copied for: parent, custom fields, priority
- reset for: done_ratio, time_entries, status
- root attribute should be left intact; it is part of Redmine IssueNestedSet implementation and is automatically maintained based on Issue's parent attribute
Updated by cryptogopher over 5 years ago
- Status changed from new to feedback
- Priority changed from support to bug
Hello sola,
Thank you for reporting! Before I start investigating:
I've discovered that e.g. Parent task is not inherited/copied to the new task.
Did you notice any other Issue attributes not copied into new recurrence, that you would like to include as well?
Generally new recurrence is created by invoking Redmine's copy()
method on Issue. Some attributes are copied by default. All others have to be assigned explicitly afterwards.
I think it's reasonable to copy parent issue info. Can you think of any scenario where it may not be appropriate (because then it would be better to set is as an option, just like for copying subtasks)?
Updated by sola over 5 years ago
Hello,
We just started using the recurring plugin - so we don't have much experience yet.
- % done
- Spent time
Should not be copied into new recurrence.
Those attributes are specific to the new recurrence.
All others that are "fundamental" attributes/metadata like Custom fields, Priority and so on should be copied to new recurrence.
I do not know how this is achieved most easily.
Are attributes/metadata flagged somehow in Redmine system?
Updated by cryptogopher over 5 years ago
- Description updated (diff)
- Status changed from feedback to in progress
sola wrote:
I think that attributes like:
- % done
- Spent time
Should not be copied into new recurrence.
Those attributes are specific to the new recurrence.
done_ratio
(% done) is zeroed on new recurrencetime_entries
(spent time) is stored separately from Issue, in time_entries table and entries seem to not be copied - need further check
All others that are "fundamental" attributes/metadata like Custom fields, Priority and so on should be copied to new recurrence.
custom fields
andpriority
are copied- actually meaningful fields that are not copied include:
parent
,status
androot
(which meaning I need to understand yet)
Issue attributes that are menaingful to users are stored in 2 ways:I do not know how this is achieved most easily.
Are attributes/metadata flagged somehow in Redmine system?
- some of them are attributes of Issue model/table
- others are stored in separate models/tables and point to the issue they are connected with (e.g. time_entries table which logs entries with spent time)
So generally all attributes need to be checked on a ony-by-one basis, no general rule here.
I'm updating description of the issue to reflect goals and findings.
Updated by cryptogopher about 5 years ago
- Description updated (diff)
- Target version set to unspecified
Updated by cryptogopher almost 5 years ago
- Status changed from in progress to closed
Applied in changeset issue-recurring-github|95646dc35ab49603fb59ad76e6f0bf31c1d7f75c.