Feature: 01 Archive completed actions
User story
----------
In order to prevent clutter in the GTD mind map because of completed actions
As a GTD Sync user
I want to be able to archive my completed actions
Moving completed actions from GTD to Archive mind map
-----------------------------------------------------
When archiving a completed action it moves from the GTD to the Archive mind
map. If it has any children they move as well.
In order to describe the mind maps before and after archiving in the
scenarios they use the following notation for node position. The children of
the root node are node1, node2 and so on. The children of node1 are node1.1,
node1.2 and so on. The children node1.1 are node1.1.1, node1.1.2 and so on.
In the same manner deeper levels of nodes can be defined.
Rules
-----
1. Archived action should have the same ancestors as the original action
2. Only ancestors not present in Archive are copied from the GTD mind map
3. Ancestors in the Archive mind map cannot have siblings of the same name
4. Same completed action with same ancestors should not exist in Archive
5. Node setting custom Done icon should not be archived
6. Only select a single node to archive it or it's descendants
Background:
Given my GTD mind map is "GTD.mm" with root node "GTD"
And my Archive mind map is "Archive.mm" with root node "Archive"
@ticket8 @0.8.0 @new_built
Scenario: S3.1.1 Archive single selected completed action
Given "GTD.mm" has completed action "Wash dishes" as node1
And "Archive.mm" has no nodes
When I archive node1 in "GTD.mm"
Then "GTD.mm" should have no nodes
And "Archive.mm" should have completed action "Wash dishes" as node1
And I should receive the following information:
"""
1 completed action is archived.
"""
@rule1 @ticket8 @0.8.0 @new_built
Scenario: S3.1.2 Archive completed actions in descendants of selected node
Given "GTD.mm" has the following nodes:
| position | type | text |
| node1 | regular | Household |
| node1.1 | project | Dinner |
| node1.1.1 | completed action | Shop |
| node1.1.2 | next action | Cook |
| node1.2 | project | Finances |
| node1.2.1 | next action | Pay bills |
| node1.2.2 | completed action | Make budget |
| node2 | regular | Study |
| node2.1 | project | Exam |
| node2.1.1 | completed action | Read book |
And "Archive.mm" has no nodes
When I archive node1 in "GTD.mm"
Then "GTD.mm" should have the following nodes:
| position | type | text |
| node1 | regular | Household |
| node1.1 | project | Dinner |
| node1.1.1 | next action | Cook |
| node1.2 | project | Finances |
| node1.2.1 | next action | Pay bills |
| node2 | regular | Study |
| node2.1 | project | Exam |
| node2.1.1 | completed action | Read book |
And "Archive.mm" should have the following nodes:
| position | type | text |
| node1 | regular | Household |
| node1.1 | project | Dinner |
| node1.1.1 | completed action | Shop |
| node1.2 | project | Finances |
| node1.2.1 | completed action | Make budget |
And I should receive the following information:
"""
2 completed actions are archived.
"""
@rule1 @ticket8 @0.8.0 @new_built
Scenario Outline: S3.1.3 Archive completed actions with descendants
Given "GTD.mm" has the following nodes:
| position | type | text |
| node1 | regular | Home improvement |
| node1.1 | project | RepairRoof |
| node1.1.1 | completed action | Buy materials |
| node1.1.1.1 | regular | Tiles |
| node1.1.1.2 | regular | Tools |
| node1.1.1.2.1 | regular | Ladder |
And "Archive.mm" has no nodes
When I archive <node> in "GTD.mm"
Then "GTD.mm" should have the following nodes:
| position | type | text |
| node1 | regular | Home improvement |
| node1.1 | project | RepairRoof |
And "Archive.mm" should have the following nodes:
| position | type | text |
| node1 | regular | Home improvement |
| node1.1 | project | RepairRoof |
| node1.1.1 | completed action | Buy materials |
| node1.1.1.1 | regular | Tiles |
| node1.1.1.2 | regular | Tools |
| node1.1.1.2.1 | regular | Ladder |
And I should receive the following information:
"""
1 completed action is archived.
"""
Examples:
| node |
| node1.1.1 |
| node1 |
@rule2 @ticket8 @0.8.0 @new_built
Scenario: S3.1.4 Archive completed actions with some ancestors in archive
Given "GTD.mm" has the following nodes:
| position | type | text |
| node1 | regular | Health |
| node1.1 | project | StartRunning |
| node1.1.1 | completed action | Buy shoes |
| node1.2 | regular | Diet |
| node1.2.1 | project | EatHealthier |
| node1.2.1.1 | regular | Knowledge |
| node1.2.1.1.1 | completed action | Read book |
And "Archive.mm" has the following nodes:
| position | type | text |
| node1 | regular | Health |
| node1.1 | regular | Diet |
| node1.1.1 | regular | EatHealthier |
| node1.1.1.1 | project | GetAdvice |
| node1.1.1.1.1 | completed action | See dietitian |
When I archive node1 in "GTD.mm"
Then "GTD.mm" should have the following nodes:
| position | type | text |
| node1 | regular | Health |
| node1.1 | project | StartRunning |
| node1.2 | regular | Diet |
| node1.2.1 | project | EatHealthier |
| node1.2.1.1 | regular | Knowledge |
And "Archive.mm" should have the following nodes:
| position | type | text |
| node1 | regular | Health |
| node1.1 | regular | Diet |
| node1.1.1 | regular | EatHealthier |
| node1.1.1.1 | project | GetAdvice |
| node1.1.1.1.1 | completed action | See dietitian |
| node1.1.2.1 | regular | Knowledge |
| node1.1.2.1.1 | completed action | Read book |
| node1.2 | project | StartRunning |
| node1.2.1 | completed action | Buy shoes |
And I should receive the following information:
"""
2 completed action are archived.
"""
@rule3 @ticket8 @0.8.0 @new_built
Scenario: S3.1.5 Archive completed action with duplicate ancestor in archive
Given "GTD.mm" has the following nodes:
| position | type | text |
| node1 | regular | Wedding |
| node1.1 | project | Guests |
| node1.1.1 | completed action | Make list |
| node1.1.2 | Completed action | Design card |
| node1.2 | project | Ceremony |
| node1.2.1 | completed action | Reserve venue |
And "Archive.mm" has the following nodes:
| position | type | text |
| node1 | regular | Wedding |
| node1.1 | regular | Guests |
| node1.2 | project | Guests |
When I archive node1 in "GTD.mm"
Then "GTD.mm" should have the following nodes:
| position | type | text |
| node1 | regular | Wedding |
| node1.1 | project | Guests |
| node1.1.1 | completed action | Make list |
| node1.1.2 | Completed action | Design card |
| node1.2 | project | Ceremony |
And "Archive.mm" should have the following nodes:
| position | type | text |
| node1 | regular | Wedding |
| node1.1 | regular | Guests |
| node1.2 | project | Guests |
| node1.3 | project | Ceremony |
| node1.3.1 | completed action | Reserve venue |
And I should receive the following error:
"""
1 completed action is archived.
2 completed actions could not be archived.
This concerns the following completed actions:
"Make list" was not archived because the node with the following name and position exists more than once in the archive mind map: Archive/Wedding/Guests
"Design card" was not archived because the node with the following name and position exists more than once in the archive mind map: Archive/Wedding/Guests
"""
@rule4 @ticket8 @0.8.0 @new_built
Scenario: S3.1.6 Archive completed action that already exists in archive
Given "GTD.mm" has the following nodes:
| position | type | text |
| node1 | regular | Theatre group |
| node1.1 | project | StagePerformance |
| node1.1.1 | completed action | Find director |
| node1.2 | project | Publicity |
| node1.2.1 | completed action | Design poster |
And "Archive.mm" has the following nodes:
| position | type | text |
| node1 | regular | Theatre group |
| node1.1 | regular | StagePerformance |
| node1.1.1 | regular | Find director |
When I archive node1 in "GTD.mm"
Then "GTD.mm" should have the following nodes:
| position | type | text |
| node1 | regular | Theatre group |
| node1.1 | project | StagePerformance |
| node1.1.1 | completed action | Find director |
| node1.2 | project | Publicity |
And "Archive.mm" should have the following nodes:
| position | type | text |
| node1 | regular | Theatre group |
| node1.1 | regular | StagePerformance |
| node1.1.1 | regular | Find director |
| node1.2 | project | Publicity |
| node1.2.1 | completed action | Design poster |
And I should receive the following error:
"""
1 completed action is archived.
1 completed action could not be archived.
This concerns the following completed action:
"Find director" was not archived because one or more nodes with the same name and position have been archived already: Archive/Theatre group/StagePerformance/Find director
"""
@rule5 @ticket8 @0.8.0 @new_built
Scenario: S3.1.7 Archiving a GTD mind map with custom Done icon
Given "GTD.mm" has the following nodes:
| position | type | text |
| node1 | regular | Settings |
| node1.1 | completed action | Icon: Done |
| node2 | regular | Garden |
| node2.2 | project | Gazebo |
| node2.2.1 | completed action | Buy wood |
And "Archive.mm" has no nodes
When I archive the root node in "GTD.mm"
Then "GTD.mm" should have the following nodes:
| position | type | text |
| node1 | regular | Settings |
| node1.1 | completed action | Icon: Done |
| node2 | regular | Garden |
| node2.2 | project | Gazebo |
And "Archive.mm" should have the following nodes:
| position | type | text |
| node1 | regular | Garden |
| node1.2 | project | Gazebo |
| node1.2.1 | completed action | Buy wood |
And I should receive the following information:
"""
1 completed action is archived.
"""
@rule6 @ticket8 @0.8.0 @new_built
Scenario: S3.1.8 Selecting multiple nodes when archiving
Given "GTD.mm" has the following nodes:
| position | type | text |
| node1 | regular | Software development |
| node1.1 | project | Tools |
| node1.1.1 | completed action | Choose IDE |
| node1.2 | project | Knowledge |
| node1.2.1 | completed action | Follow Java course |
And "Archive.mm" has no nodes
When I archive node1.1, the root node and node1.2.1 in "GTD.mm"
Then I should receive the following warning:
"""
You have selected multiple nodes. The Archive function only accepts a single selected node. It will now process the node 'Tools' and its descendants, if any. Would you like to continue?
"""
Global steps
Related
Tickets: #16
Tickets: #22
Tickets: #28
Tickets: #8
Last edit: Henk van den Akker 2017-10-14
JFileChooser customisation and translation
Problem
For user stories [#8], [#16] and [#28] a customised JFileChooser dialog is used for creating and selecting files and directories. Part of the text labels are adapted and they also need to be translated (the resource bundles with Java Swing are limited to a few languages). Freeplane seems to use the SystemLookAndFeel most of the time. Because of this the outcome of the customisation can be quite unpredictable, since the SystemLookAndFeel differs a lot over platforms. E.g. the GTK+ L&F has a Rename button unlike any other SystemLookAndFeel.
Solution
Limit the number of L&Fs as follows:
Text label strings in the JFileChooser UI are customised and translated with UIManager.put(key, "New text string")
After the JFileChooser has been created the L&F and the text label strings are reverted to their original value.
Steps
Related
Tickets: #16
Tickets: #28
Tickets: #8
Last edit: Henk van den Akker 2017-11-10
Next action
Done
Related
Tickets: #16
Tickets: #28
Tickets: #8
Last edit: Henk van den Akker 2018-12-22