Modify

Opened 7 years ago

Closed 3 months ago

Last modified 3 months 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 7 years ago.
Patch

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by anonymous

Patch

comment:1 Changed 7 years ago by anonymous

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

comment:2 Changed 7 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 6 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!

comment:4 Changed 3 months ago by rjollos

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

In 15865:

0.1.2: Fix validate_ticket raising error when fields unchanged

Fixes #6045.

comment:5 Changed 3 months ago by rjollos

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.

Add Comment

Modify Ticket

Action
as closed The owner will remain thomasvs.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.