Modify

Opened 15 years ago

Closed 8 years ago

Last modified 8 years ago

#6045 closed defect (fixed)

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 15 years ago.
Patch

Download all attachments as: .zip

Change History (6)

Changed 15 years ago by anonymous

Attachment: tracdupplugin.diff added

Patch

comment:1 Changed 15 years ago by anonymous

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

comment:2 Changed 15 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 14 years ago by Jonathan van Alteren

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!

comment:4 Changed 8 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

In 15865:

0.1.2: Fix validate_ticket raising error when fields unchanged

Fixes #6045.

comment:5 Changed 8 years ago by Ryan J Ollos

The basic functionality should work with Trac 0.12 and 1.0 now, but I think the plugin design is flawed and it needs to be rewritten.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain thomasvs.
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.