Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

User Wish #1071 (new)

Opened 10 years ago

Last modified 9 years ago

Incompatibility with TicketImport plugin

Reported by: agilouser Owned by:
Keywords: n.a. Cc:

Description (last modified by fschwarz)

Attempting to change bunch of tickets and update remaining_time.

After import looks like agilo tracebacks on remaining_time being 8.0 instead of 8.

Could you type cast remaining_time to int?

Python Traceback

Most recent call last:
File "/usr/lib/python2.4/site-packages/Trac-0.11.6-py2.4.egg/trac/web/", line 450, in _dispatch_request
File "/usr/lib/python2.4/site-packages/Trac-0.11.6-py2.4.egg/trac/web/", line 206, in dispatch
File "/abn/trac/abn/plugins/TicketImport-0.7c-py2.4.egg/talm_importer/", line 76, in process_request
Local variables:
Name	Value
action	u'import'
req	<Request "POST u'/importer'">
self	<talm_importer.importer.ImportModule object at 0x2ad77d82db50>
tickettime	1268160752
File "/abn/trac/abn/plugins/TicketImport-0.7c-py2.4.egg/talm_importer/", line 115, in _do_import
Local variables:
Name	Value
filereader	<talm_importer.readers.CSVReader object at 0x2ad77dd5e5d0>
req	<Request "POST u'/importer'">
self	<talm_importer.importer.ImportModule object at 0x2ad77d82db50>
sheet	1
tickettime	1268160752
uploadedfile	u'/tmp/tmp3dWbTf'
uploadedfilename	u'4.5-planning-import-8.csv'
File "/abn/trac/abn/plugins/TicketImport-0.7c-py2.4.egg/talm_importer/", line 342, in _process
Local variables:
Name	Value
PatchedTicket	<class 'talm_importer.ticket.PatchedTicket'>
add_sql_result	<function add_sql_result at 0x2ad77dd5cf50>
cell	u''
cls	<class 'trac.ticket.model.Version'>
column	'remaining_time'
columns	['id', 'summary', 'status', 'owner', 'type', 'sprint', 'remaining_time']
computedfields	{'changetime': {'set': False, 'value': "''(now)''"}, 'cc': None, ...
customfields	[u'rd_points', u'sprint', u'drp_resources', u'story_priority', ...
db	<trac.db.pool.PooledConnection object at 0x2ad77dbaa230>
duplicate_summaries	[]
existingusers	[(u'adamd',), (u'',), (u'alc',), (u'chrisg',), ...
existingvalues	{'status': [u'accepted', u'assigned', u'closed', u'new', u'reopened'], ...
f	'resolution'
field	{'name': u'requesting_customer', 'format': 'plain', 'type': u'text', ...
filereader	<talm_importer.readers.CSVReader object at 0x2ad77dd5e5d0>
idcolumn	'id'
importedfields	['id', 'summary', 'status', 'owner', 'type', 'sprint', 'remaining_time']
lowercaseimportedfields	['id', 'summary', 'status', 'owner', 'type', 'sprint', 'remaining_time']
missingdefaultedfields	['changetime', 'priority', 'reporter', 'time', 'resolution']
missingemptyfields	['cc', u'duration', 'keywords', u'rd_points', u'drp_resources', ...
missingfields	['changetime', 'cc', u'duration', 'keywords', u'rd_points', ...
name	'version'
newusers	[u'mirom']
newvalues	{'status': [], 'type': []}
notimportedfields	[]
options	[u'accepted', u'assigned', u'closed', u'new', u'reopened']
ownercolumn	None
processor	<talm_importer.processors.ImportProcessor object at 0x2ad77db359d0>
reporter	'igorl'
row	{'status': u'new', 'remaining_time': u'', 'summary': u'IPv6 support for ...
row_idx	0
rows	<talm_importer.readers.CP1252DictReader instance at 0x2ad77daef560>
selects	[('type', <class 'trac.ticket.model.Type'>), ('status', <class ...
self	<talm_importer.importer.ImportModule object at 0x2ad77d82db50>
ticket	<talm_importer.ticket.PatchedTicket object at 0x2ad77dd5e8d0>
ticket_id	u'1721'
tracfields	['ticket', 'id', 'summary', 'reporter', 'owner', 'description', 'type', ...
val	<trac.ticket.model.Status object at 0x2ad77dd5e590>
File "/abn/trac/abn/plugins/TicketImport-0.7c-py2.4.egg/talm_importer/", line 101, in end_process_row
Local variables:
Name	Value
message	u'Batch update from file 4.5-planning-import-8.csv'
self	<talm_importer.processors.ImportProcessor object at 0x2ad77db359d0>
tickettime	datetime.datetime(2010, 3, 9, 13, 52, 32, ...
to_datetime	<function to_datetime at 0x2ad7715d8758>
File "/usr/lib/python2.4/site-packages/Trac-0.11.6-py2.4.egg/trac/ticket/", line 296, in save_changes
Code fragment:
        old_values = self._old
        self._old = {}
        self.time_changed = when
        for listener in TicketSystem(self.env).change_listeners:
            listener.ticket_changed(self, comment, author, old_values)
        return True
    def get_changelog(self, when=None, db=None):
        """Return the changelog as a list of tuples of the form
        (time, author, field, oldvalue, newvalue, permanent).
Local variables:
Name	Value
author	'igorl'
cnum	''
comment	u'Batch update from file 4.5-planning-import-8.csv'
cursor	<trac.db.util.IterableCursor object at 0x2ad77dd5e710>
custom_fields	[u'rd_points', u'sprint', u'drp_resources', u'story_priority', ...
db	<trac.db.pool.PooledConnection object at 0x2ad77dbaac30>
f	{'name': u'requesting_customer', 'format': 'plain', 'label': u'Requesting ...
handle_ta	False
listener	<agilo.scrum.backlog.burndown.RemainingTimeUpdater object at ...
name	'remaining_time'
old_values	{'remaining_time': u'--'}
self	<talm_importer.ticket.PatchedTicket object at 0x2ad77dd5ef90>
when	datetime.datetime(2010, 3, 9, 13, 52, 32, ...
when_ts	1268160752
File "/usr/lib/python2.4/site-packages/binary_agilo-1.2.1_PRO-py2.4.egg/agilo/scrum/backlog/", line 204, in ticket_changed
Code fragment:
            # remaining time has been changed
            previous_remaining_time = old_values.get(Key.REMAINING_TIME)
            ticket_remaining = float(ticket[Key.REMAINING_TIME] or '0')
            if previous_remaining_time != ticket_remaining:
                rt = RemainingTime(self.env, ticket)
                debug(self, "Updated remaining_time for ticket #%s from: %s to %s" % \
                      (ticket, previous_remaining_time, ticket_remaining))
    def ticket_deleted(self, ticket):
Local variables:
Name	Value
author	'igorl'
comment	u'Batch update from file 4.5-planning-import-8.csv'
old_values	{'remaining_time': u'--'}
previous_remaining_time	u'--'
self	<agilo.scrum.backlog.burndown.RemainingTimeUpdater object at ...
ticket	<talm_importer.ticket.PatchedTicket object at 0x2ad77dd5ef90>
ticket_remaining	0.0
File "/usr/lib/python2.4/site-packages/binary_agilo-1.2.1_PRO-py2.4.egg/agilo/scrum/backlog/", line 52, in __init__
Code fragment:
        self.task = task
        self.db = db
        # List of (timestamp, remaining time) tuples. Timestamps are epoch
        # seconds, remaining time is a number (int or float) in hours. Ordered 
        # in descending order by timestamp.
        self.history = self._load(db)
    def _get_timestamp(self, value, ordinal_on_midnight=True):
        # Keep in mind that to have an identity function to make sure that the
        # value on the DB are correctly read and interpreted you need to:
        # timestamp = 1246116716
Local variables:
Name	Value
db	None
env	<trac.env.Environment object at 0x2ad77174fd50>
self	<agilo.scrum.backlog.burndown.RemainingTime object at 0x2ad77dd64090>
task	<talm_importer.ticket.PatchedTicket object at 0x2ad77dd5ef90>
File "/usr/lib/python2.4/site-packages/binary_agilo-1.2.1_PRO-py2.4.egg/agilo/scrum/backlog/", line 156, in _load
Code fragment:
    def _load(self, db=None):
        """Try to load the Sprint from the database"""
        db, handle_ta = get_db_for_write(self.env, db)
        sql_query = "SELECT date, remaining_time FROM %s" \
                    " WHERE task_id=%d ORDER BY date DESC" % (BURNDOWN_TABLE,
        debug(self, "Burndown-SQL Query: %s" % sql_query)
            history = dict()
            cursor = db.cursor()
Local variables:
Name	Value
db	<trac.db.pool.PooledConnection object at 0x2ad77dd5faa0>
handle_ta	True
self	<agilo.scrum.backlog.burndown.RemainingTime object at 0x2ad77dd64090>

System Information:

User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.307.1 Safari/532.9

Trac:	0.11.6
Python:	2.4.3 (#1, Sep 3 2009, 15:37:37) [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)]
setuptools:	0.6c11
psycopg2:	2.0.14
Genshi:	0.5.1
mod_python:	3.2.8
Pygments:	1.3
Agilo:	1.2.1-PRO
jQuery:	1.2.6

Change History (7)

comment:1 Changed 10 years ago by fschwarz

This traceback is basically unreadable. Can you either click on the 'create a new bug report' button and copy the description here (don't submit a bug report at or switch to simple view and paste the traceback?

comment:2 Changed 10 years ago by agilouser

  • Description modified (diff)

comment:3 Changed 10 years ago by agilouser

three braces should work ;-) /k

comment:4 Changed 9 years ago by fschwarz

  • Sprint Agilo 0.9.0 (Sprint 1) deleted

comment:5 Changed 9 years ago by fschwarz

  • Impact set to Minimal

comment:6 Changed 9 years ago by fschwarz

  • Description modified (diff)
  • Summary changed from Agilo - TicketImport incompatibility to Incompatibility with TicketImport plugin

comment:7 Changed 9 years ago by fschwarz

  • Type changed from Bug to User Wish
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.15 © 2008-2016 Agilo Software all rights reserved (this page was served in: 0.34462 sec.)