@@ -117,6 +117,31 @@ def build_tags
117
117
end
118
118
# Trackers
119
119
tracker_project_ids = valid_tracker_project_ids ( )
120
+
121
+ simple_notes = Tracker . where ( id : Setting . plugin_redmine_gtt_smash [ 'tracker_simple_notes' ] )
122
+ photo_notes = Tracker . where ( id : Setting . plugin_redmine_gtt_smash [ 'tracker_photo_notes' ] )
123
+ gps_logs = Tracker . where ( id : Setting . plugin_redmine_gtt_smash [ 'tracker_gps_logs' ] )
124
+ default_subject = Setting . plugin_redmine_gtt_smash [ 'default_subject' ]
125
+
126
+ if simple_notes . length ( ) > 0
127
+ simple_notes = {
128
+ tracker_id : simple_notes [ 0 ] . id ,
129
+ tracker_name : simple_notes [ 0 ] . name
130
+ }
131
+ end
132
+ if photo_notes . length ( ) > 0
133
+ photo_notes = {
134
+ tracker_id : photo_notes [ 0 ] . id ,
135
+ tracker_name : photo_notes [ 0 ] . name
136
+ }
137
+ end
138
+ if gps_logs . length ( ) > 0
139
+ gps_logs = {
140
+ tracker_id : gps_logs [ 0 ] . id ,
141
+ tracker_name : gps_logs [ 0 ] . name
142
+ }
143
+ end
144
+
120
145
Tracker . where ( id : tracker_project_ids . keys ) . sort . each do |tracker |
121
146
# Projects
122
147
project_ids = tracker_project_ids [ tracker . id ]
@@ -135,6 +160,16 @@ def build_tags
135
160
sectionname : tracker . name ,
136
161
sectiondescription : "GTT" ,
137
162
sectionicon : "image" ,
163
+ sectionconfig : {
164
+ defaultnotetracker : {
165
+ simple_notes : simple_notes ,
166
+ photo_notes : photo_notes ,
167
+ gps_logs : gps_logs
168
+ } ,
169
+ defaults : {
170
+ subject : default_subject
171
+ }
172
+ } ,
138
173
forms : [ {
139
174
formname : tracker . name ,
140
175
formitems : [
0 commit comments