Modify

Opened 13 years ago

Closed 13 years ago

#8486 closed defect (fixed)

"NameError: global name 'ticketsByID' is not defined" when using TracJSGanttChart macro

Reported by: ddavenport@… Owned by: Chris Nelson
Priority: normal Component: TracJsGanttPlugin
Severity: major Keywords:
Cc: Trac Release: 0.11

Description (last modified by Ryan J Ollos)

I am using Trac-jsGantt 0.3, configured as follows:

[trac-jsgantt]
fields.parent = parents
fields.start = start_date
fields.finish = due_date
date_format = %Y-%m-%d

The listed custom fields exists, however not all of the date fields are filled in.

When I create a macro using the sample=1 parameter it seems to work file. When I use milestone="Milestone Name" as the parameter it fails the the error message:

"NameError: global name 'ticketsByID' is not defined".

This message is from the trac log. The Wiki page shows "No tasks selected."

Attachments (0)

Change History (6)

comment:1 Changed 13 years ago by Ryan J Ollos

Description: modified (diff)

comment:2 Changed 13 years ago by Chris Nelson

(In [9845]) Fix bad merge. Addresses #8486.

I renamed tarr to ticketsByID in another branch and only got part of that change into the main line.

comment:3 Changed 13 years ago by didley@…

Same error again. I used your patch and got the same error.

2011-02-10 16:01:29,618 Trac[formatter] ERROR: Macro TracJSGanttChart(milestone=testmilestone) failed: 
Traceback (most recent call last):
  File "build\bdist.win32\egg\trac\wiki\formatter.py", line 717, in _macro_formatter
  File "build\bdist.win32\egg\trac\wiki\formatter.py", line 304, in process
    def new_alignment(self, align): pass
  File "build\bdist.win32\egg\trac\wiki\formatter.py", line 291, in _macro_processor
    self.para_end = self.parskip = self.have_label = 0
  File "build\bdist.win32\egg\tracjsgantt\tracjsgantt.py", line 620, in expand_macro
    tasks = self._add_tasks(options)
  File "build\bdist.win32\egg\tracjsgantt\tracjsgantt.py", line 593, in _add_tasks
    self._compute_wbs()
  File "build\bdist.win32\egg\tracjsgantt\tracjsgantt.py", line 293, in _compute_wbs
    or int(t[self.fields['parent']]) not in ticketsByID.keys():
NameError: global name 'ticketsByID' is not defined

comment:4 Changed 13 years ago by didley@…

Sorry. It's a fault of mine. Never mind the message before.

didley

comment:5 Changed 13 years ago by ddavenport@…

This change works for me. Thanks!

comment:6 Changed 13 years ago by Chris Nelson

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Chris Nelson.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.