Modify

Opened 5 years ago

Last modified 4 years ago

#6045 new defect

unable to create or modify ticket because 'dups' and 'dup_count' are seen as modified

Reported by: anonymous Owned by: thomasvs
Priority: high Component: TracDupPlugin
Severity: blocker Keywords:
Cc: Trac Release: 0.11

Description

When creating a ticket or modifying an existing one i was unable to save my changes.

Source code inspection and debugging revealed ticket.values.get('dups', None) and ticket.values.get('dup_count', None) return and empty string instead of None, presumably because the browser send the field with no value instead of not sending it at all.

Attached is a diff that inserts a check for the empty string.

Additionally when creating a new ticket I got a KeyError when checking for old status which (at least over here) is not set when creating a new ticket.

Attached diff contains a fix as well.

Last but not least I removed superfluous import time; statements, for pure prettiness.

Attachments (1)

tracdupplugin.diff (2.2 KB) - added by anonymous 5 years ago.
Patch

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by anonymous

Patch

comment:1 Changed 5 years ago by anonymous

Forgot to mention I fixed setup.py because I got error message during python setup.py ...

comment:2 Changed 5 years ago by anonymous

confirmed. patch solves the issue. Using trac 0.11 package from Debian Lenny with TracDupPlugin rev6525

Thanks a lot for the patches!

comment:3 Changed 4 years ago by jvalteren

I ran into this issue as well.

Please, update the code in SVN with the patch so people don't have to patch manually, but can use easy_install to work directly from the SVN repository.

Thanks!

Add Comment

Modify Ticket

Action
as new The owner will remain thomasvs.
Author


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

 
Note: See TracTickets for help on using tickets.