@@ -37,16 +37,22 @@ class TokenPropertyMapper
37
37
context . public_send ( key . to_sym )
38
38
end . curry
39
39
40
+ # Parent ID <- Is tagged as Parent
41
+
40
42
TOKEN_PROPERTY_MAP = IceNine . deep_freeze (
41
43
{
44
+ id : { fn : -> ( wp ) { wp . id } , label : -> { WorkPackage . human_attribute_name ( :id ) } } ,
42
45
accountable : { fn : -> ( wp ) { wp . responsible &.name } , label : -> { WorkPackage . human_attribute_name ( :responsible ) } } ,
43
46
assignee : { fn : -> ( wp ) { wp . assigned_to &.name } , label : -> { WorkPackage . human_attribute_name ( :assigned_to ) } } ,
44
47
author : { fn : -> ( wp ) { wp . author &.name } , label : -> { WorkPackage . human_attribute_name ( :author ) } } ,
45
48
category : { fn : -> ( wp ) { wp . category &.name } , label : -> { WorkPackage . human_attribute_name ( :category ) } } ,
46
49
creation_date : { fn : -> ( wp ) { wp . created_at } , label : -> { WorkPackage . human_attribute_name ( :created_at ) } } ,
47
50
estimated_time : { fn : -> ( wp ) { wp . estimated_hours } , label : -> { WorkPackage . human_attribute_name ( :estimated_hours ) } } ,
48
51
finish_date : { fn : -> ( wp ) { wp . due_date } , label : -> { WorkPackage . human_attribute_name ( :due_date ) } } ,
49
- parent : { fn : -> ( wp ) { wp . parent &.id } , label : -> { WorkPackage . human_attribute_name ( :parent ) } } ,
52
+ parent_id : { fn : -> ( wp ) { wp . parent &.id } , label : -> { WorkPackage . human_attribute_name ( :parent_id ) } } ,
53
+ parent_assignee : { fn : -> ( wp ) { wp . parent &.assigned_to &.name } , label : -> {
54
+ WorkPackage . human_attribute_name ( :assigned_to )
55
+ } } ,
50
56
parent_author : { fn : -> ( wp ) { wp . parent &.author &.name } , label : -> { WorkPackage . human_attribute_name ( :author ) } } ,
51
57
parent_category : { fn : -> ( wp ) { wp . parent &.category &.name } ,
52
58
label : -> { WorkPackage . human_attribute_name ( :category ) } } ,
@@ -57,6 +63,7 @@ class TokenPropertyMapper
57
63
parent_finish_date : { fn : -> ( wp ) { wp . parent &.due_date } ,
58
64
label : -> { WorkPackage . human_attribute_name ( :due_date ) } } ,
59
65
parent_priority : { fn : -> ( wp ) { wp . parent &.priority } , label : -> { WorkPackage . human_attribute_name ( :priority ) } } ,
66
+ parent_subject : { fn : -> ( wp ) { wp . parent &.subject } , label : -> { WorkPackage . human_attribute_name ( :subject ) } } ,
60
67
priority : { fn : -> ( wp ) { wp . priority } , label : -> { WorkPackage . human_attribute_name ( :priority ) } } ,
61
68
project : { fn : -> ( wp ) { wp . project_id } , label : -> { WorkPackage . human_attribute_name ( :project ) } } ,
62
69
project_active : { fn : -> ( wp ) { wp . project &.active? } , label : -> { Project . human_attribute_name ( :active ) } } ,
0 commit comments