Opened 6 years ago

Closed 6 years ago

#8486 closed defect (fixed)

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

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

Description (last modified by rjollos)

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

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 6 years ago by rjollos

  • Description modified (diff)

comment:2 Changed 6 years ago by ChrisNelson

(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 6 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\", line 717, in _macro_formatter
  File "build\bdist.win32\egg\trac\wiki\", line 304, in process
    def new_alignment(self, align): pass
  File "build\bdist.win32\egg\trac\wiki\", line 291, in _macro_processor
    self.para_end = self.parskip = self.have_label = 0
  File "build\bdist.win32\egg\tracjsgantt\", line 620, in expand_macro
    tasks = self._add_tasks(options)
  File "build\bdist.win32\egg\tracjsgantt\", line 593, in _add_tasks
  File "build\bdist.win32\egg\tracjsgantt\", 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 6 years ago by didley@…

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


comment:5 Changed 6 years ago by ddavenport@…

This change works for me. Thanks!

comment:6 Changed 6 years ago by ChrisNelson

  • Resolution set to fixed
  • Status changed from new to closed

Add Comment

Modify Ticket

as closed The owner will remain ChrisNelson.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.