@@ -39,14 +39,18 @@ class TokenPropertyMapper
39
39
40
40
TOKEN_PROPERTY_MAP = IceNine . deep_freeze (
41
41
{
42
+ id : { fn : -> ( wp ) { wp . id } , label : -> { WorkPackage . human_attribute_name ( :id ) } } ,
42
43
accountable : { fn : -> ( wp ) { wp . responsible &.name } , label : -> { WorkPackage . human_attribute_name ( :responsible ) } } ,
43
44
assignee : { fn : -> ( wp ) { wp . assigned_to &.name } , label : -> { WorkPackage . human_attribute_name ( :assigned_to ) } } ,
44
45
author : { fn : -> ( wp ) { wp . author &.name } , label : -> { WorkPackage . human_attribute_name ( :author ) } } ,
45
46
category : { fn : -> ( wp ) { wp . category &.name } , label : -> { WorkPackage . human_attribute_name ( :category ) } } ,
46
47
creation_date : { fn : -> ( wp ) { wp . created_at } , label : -> { WorkPackage . human_attribute_name ( :created_at ) } } ,
47
48
estimated_time : { fn : -> ( wp ) { wp . estimated_hours } , label : -> { WorkPackage . human_attribute_name ( :estimated_hours ) } } ,
48
49
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 ) } } ,
50
+ parent_id : { fn : -> ( wp ) { wp . parent &.id } , label : -> { WorkPackage . human_attribute_name ( :parent_id ) } } ,
51
+ parent_assignee : { fn : -> ( wp ) { wp . parent &.assigned_to &.name } , label : -> {
52
+ WorkPackage . human_attribute_name ( :assigned_to )
53
+ } } ,
50
54
parent_author : { fn : -> ( wp ) { wp . parent &.author &.name } , label : -> { WorkPackage . human_attribute_name ( :author ) } } ,
51
55
parent_category : { fn : -> ( wp ) { wp . parent &.category &.name } ,
52
56
label : -> { WorkPackage . human_attribute_name ( :category ) } } ,
@@ -57,6 +61,7 @@ class TokenPropertyMapper
57
61
parent_finish_date : { fn : -> ( wp ) { wp . parent &.due_date } ,
58
62
label : -> { WorkPackage . human_attribute_name ( :due_date ) } } ,
59
63
parent_priority : { fn : -> ( wp ) { wp . parent &.priority } , label : -> { WorkPackage . human_attribute_name ( :priority ) } } ,
64
+ parent_subject : { fn : -> ( wp ) { wp . parent &.subject } , label : -> { WorkPackage . human_attribute_name ( :subject ) } } ,
60
65
priority : { fn : -> ( wp ) { wp . priority } , label : -> { WorkPackage . human_attribute_name ( :priority ) } } ,
61
66
project : { fn : -> ( wp ) { wp . project_id } , label : -> { WorkPackage . human_attribute_name ( :project ) } } ,
62
67
project_active : { fn : -> ( wp ) { wp . project &.active? } , label : -> { Project . human_attribute_name ( :active ) } } ,
@@ -111,7 +116,7 @@ def work_package_cfs_for(type)
111
116
end
112
117
113
118
def all_work_package_cfs
114
- WorkPackageCustomField . where ( multi_value : false ) . where . not ( field_format : %w[ text bool link empty ] ) . order ( :name )
119
+ WorkPackageCustomField . where . not ( field_format : %w[ text bool link empty ] ) . order ( :name )
115
120
end
116
121
117
122
def project_attributes
0 commit comments