Opened 10 years ago
Closed 10 years ago
#338 closed defect (fixed)
Error assigns a ticket to a Developer
Reported by: | ivanelsonnunes@… | Owned by: | bas |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | email2trac | Version: | 2.7.0 |
Keywords: | tracjsgantt | Cc: | ivanelsonnunes@… |
Description
Always this error occurs. When will I assign a ticket.
I noticed that this only occurs in the ticket's created [1] email2trac. The plugin is being broken TracjsGantt.
Maybe this is a chain reaction. I use customized and required fields. However, the tickets created by email2trac not carry these custom and required fields. This explains?
[1] https://oss.trac.surfsara.nl/email2trac
Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/web/main.py", line 497, in _dispatch_request dispatcher.dispatch(req) File "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/web/main.py", line 214, in dispatch resp = chosen_handler.process_request(req) File "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/ticket/web_ui.py", line 179, in process_request return self._process_ticket_request(req) File "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/ticket/web_ui.py", line 614, in _process_ticket_request self._do_save(req, ticket, action) File "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/ticket/web_ui.py", line 1328, in _do_save replyto=req.args.get('replyto')) File "/usr/local/lib/python2.7/dist-packages/Trac-1.0-py2.7.egg/trac/ticket/model.py", line 363, in save_changes listener.ticket_changed(self, comment, author, old_values) File "/usr/local/lib/python2.7/dist-packages/Trac_jsGantt-0.10-py2.7.egg/tracjsgantt/tracpm.py", line 2957, in ticket_changed self.rescheduleTickets(ticket, old_values) File "/usr/local/lib/python2.7/dist-packages/Trac_jsGantt-0.10-py2.7.egg/tracjsgantt/tracpm.py", line 2766, in rescheduleTickets self.spliceGraph(tickets, ticket, old_values) File "/usr/local/lib/python2.7/dist-packages/Trac_jsGantt-0.10-py2.7.egg/tracjsgantt/tracpm.py", line 2667, in spliceGraph if len(old_values[previewFields[fwd]]) == 0: TypeError: object of type 'NoneType' has no len()
Attachments (0)
Change History (14)
comment:1 follow-up: ↓ 2 Changed 10 years ago by bas
- Status changed from new to assigned
comment:2 in reply to: ↑ 1 Changed 10 years ago by ivanelsonnunes@…
Replying to bas:
I am a bit swamped at this moment, but email2trac can handle custom fields. It was added in ticket #101. I have no experience with the TracjsGantt? plugin. So maybe i do not use the right entry point for custom fields ticket or TracjsGantt? does not register its self properly. I have to install the TracjsGantt? to test it.
I think I know the reason of the problem, although I do not know the solution. The email2trac're not adding in ticket_custom table. Tickets created directly in trac, are always created in ticket_custom table.
comment:3 Changed 10 years ago by bas
ok in the emsil2trac code we check for custom fields:
## default trac value 1116 # 1117 if not field.get('custom'): 1118 value = self.get_config('ticket', 'default_%s' %(name) ) 1119 1120 ## skip this field can only be set by email2trac.conf 1121 # 1122 if name in ['resolution']: 1123 value = None 1124 1125 else: 1126 ## Else get the default value for reporter 1127 # 1128 value = field.get('value') 1129 options = field.get('options') 1130 1131 if value and options and (value not in options): 1132 value = options[int(value)]
If you run in debug mode are the custom fields then shown? You can test with the supplied email test message.
comment:4 Changed 10 years ago by ivanelsonnunes@…
The bug mode shows the fields:
2278 2014-04-02 16:36:01,249 email2trac claudino: email2trac[type] = Triagem 2279 2014-04-02 16:36:01,249 email2trac claudino: used type = Triagem 2280 2014-04-02 16:36:01,249 email2trac claudino: trac[status] = 2281 2014-04-02 16:36:01,249 email2trac claudino: trac[priority] = Normal 2282 2014-04-02 16:36:01,249 email2trac claudino: email2trac[priority] = Alta 2283 2014-04-02 16:36:01,250 email2trac claudino: used priority = Alta 2284 2014-04-02 16:36:01,250 email2trac claudino: trac[milestone] = 2285 2014-04-02 16:36:01,250 email2trac claudino: trac[component] = CLICK PARA SELECIONAR O SISTEMA 2286 2014-04-02 16:36:01,250 email2trac claudino: email2trac[component] = TRAC 2287 2014-04-02 16:36:01,250 email2trac claudino: used component = TRAC 2288 2014-04-02 16:36:01,250 email2trac claudino: trac[version] = 2289 2014-04-02 16:36:01,250 email2trac claudino: trac[severity] = Normal 2290 2014-04-02 16:36:01,250 email2trac claudino: email2trac[severity] = Normal 2291 2014-04-02 16:36:01,250 email2trac claudino: used severity = Normal 2292 2014-04-02 16:36:01,250 email2trac claudino: trac[resolution] = None 2293 2014-04-02 16:36:01,250 email2trac claudino: trac[keywords] = 2294 2014-04-02 16:36:01,251 email2trac claudino: email2trac[keywords] = ServiceDesk 2295 2014-04-02 16:36:01,251 email2trac claudino: used keywords = ServiceDesk 2296 2014-04-02 16:36:01,251 email2trac claudino: trac[cc] = 2297 2014-04-02 16:36:01,251 email2trac claudino: trac[time] = 2298 2014-04-02 16:36:01,251 email2trac claudino: trac[changetime] = 2299 2014-04-02 16:36:01,251 email2trac claudino: trac[blockedby] = 2300 2014-04-02 16:36:01,251 email2trac claudino: email2trac[blockedby] = 2301 2014-04-02 16:36:01,251 email2trac claudino: trac[blocking] = 2302 2014-04-02 16:36:01,251 email2trac claudino: email2trac[blocking] = 2303 2014-04-02 16:36:01,251 email2trac claudino: trac[parents] = 2304 2014-04-02 16:36:01,251 email2trac claudino: trac[aplicacao] = 2305 2014-04-02 16:36:01,251 email2trac claudino: trac[projeto] = 2306 2014-04-02 16:36:01,252 email2trac claudino: trac[setor] = 2307 2014-04-02 16:36:01,252 email2trac claudino: trac[solicitante] = 2308 2014-04-02 16:36:01,252 email2trac claudino: trac[due_assign] = 2309 2014-04-02 16:36:01,252 email2trac claudino: email2trac[due_assign] = 2310 2014-04-02 16:36:01,252 email2trac claudino: trac[due_close] = 2311 2014-04-02 16:36:01,252 email2trac claudino: email2trac[due_close] =
comment:5 Changed 10 years ago by bas
So it sees the custom fields,but it has no default values. Are they defined?
comment:6 Changed 10 years ago by ivanelsonnunes@…
Are not defined. Trac is standard treatment when the fields are not defined. Where Trac itself defines default values.
comment:7 Changed 10 years ago by ivanelsonnunes@…
In method def set_ticket_fields(self, ticket):
If you change this:
if value: user_dict[name] = value
To this:
if value: user_dict[name] = value else: user_dict[name] = ''
comment:8 follow-up: ↓ 9 Changed 10 years ago by bas
Is this the solution for your problem?
comment:9 in reply to: ↑ 8 Changed 10 years ago by ivanelsonnunes@…
Replying to bas:
Is this the solution for your problem?
In theory yes! Showed no more problem. However I declared all the fields /etc/email2trac.conf. The default fields I left null.
- In /etc/email2trac.conf:
DEFAULT_keywords : ServiceDesk DEFAULT_component : TRAC DEFAULT_priority : Alta DEFAULT_severity : Normal DEFAULT_type : Triagem DEFAULT_aplicacao : DEFAULT_blockedby : DEFAULT_blocking : DEFAULT_due_assign: DEFAULT_due_close : DEFAULT_parents : DEFAULT_projeto : DEFAULT_setor : DEFAULT_solicitante:
comment:10 follow-up: ↓ 11 Changed 10 years ago by bas
If the above patch is applied then the declaration of the custom fields in email2trac.conf is not necessary anymore?
comment:11 in reply to: ↑ 10 Changed 10 years ago by ivanelsonnunes@…
Replying to bas:
If the above patch is applied
I have not tested it:
then the declaration of the custom fields in email2trac.conf is not necessary anymore?
comment:12 follow-up: ↓ 13 Changed 10 years ago by ivanelsonnunes@…
I tested. With this patch. No need to declare all fields in email2trac.conf file.
Thank you.
comment:13 in reply to: ↑ 12 Changed 10 years ago by bas
Replying to ivanelsonnunes@…:
I tested. With this patch. No need to declare all fields in email2trac.conf file.
Thank you.
thanks patch will be applied
comment:14 Changed 10 years ago by bas
- Resolution set to fixed
- Status changed from assigned to closed
see Changeset: [638]
I am a bit swamped at this moment, but email2trac can handle custom fields. It was added in ticket #101. I have no experience with the TracjsGantt? plugin. So maybe i do not use the right entry point for custom fields ticket or TracjsGantt? does not register its self properly. I have to install the TracjsGantt? to test it.