Modify

Opened 4 years ago

Closed 4 years ago

#6963 closed enhancement (fixed)

[Patch] Create proper plugin for DuplicateTicketSearchPlugin

Reported by: chrisheller Owned by: rjollos
Priority: normal Component: DuplicateTicketSearchPlugin
Severity: normal Keywords:
Cc: rjollos Trac Release: 0.11

Description

I've created the files needed to turn this into a proper plugin.

The init.py file is the main file of interest. The setup.py should be edited to properly reflect your info though.

Also, you'll need to move the files to match the following layout

  • duplicateticketsearchplugin
    • 0.11
    • setup.py
    • duplicateticket
      • init.py
      • htdocs
        • css
          • tracDupeSearch.css
        • js
          • tracDupeSearch.js

You can restructure that a bit if you want, but then you'd need to update the *.py files to match whatever you change things to.

Once that is done, you should be able to run python setup.py bdist_egg and use the .egg itself instead of needing to modify the delivered trac files.

  • duplicateticket

Attachments (2)

setup.py (424 bytes) - added by chrisheller 4 years ago.
__init__.py (942 bytes) - added by chrisheller 4 years ago.

Download all attachments as: .zip

Change History (8)

Changed 4 years ago by chrisheller

Changed 4 years ago by chrisheller

comment:1 Changed 4 years ago by anonymous

I have tested this on 0.12, and it works great. Thanks

comment:2 Changed 4 years ago by rjollos

  • Cc rjollos added
  • Summary changed from Create proper plugin for DuplicateTicketSearchPlugin to [Patch] Create proper plugin for DuplicateTicketSearchPlugin

comment:3 follow-up: Changed 4 years ago by anonymous

copying build/lib.linux-i686-2.6/duplicateticket/__init__.py -> 
build/bdist.linux-i686/egg/duplicateticket
byte-compiling build/bdist.linux-i686/egg/duplicateticket/init.py to init.pyc
Sorry: IndentationError: ('unexpected indent', ('build/bdist.linux-i686/egg/duplicateticket/init.py', 4, 1, ' from trac.core import *\n'))
byte-compiling build/bdist.linux-i686/egg/duplicateticket/__init__.py to __init__.pyc

i use python2.6 for "python setup.py bdist_egg" and could not be display correctly

comment:4 in reply to: ↑ 3 ; follow-up: Changed 4 years ago by rjollos

  • Owner changed from gregmac to rjollos
  • Status changed from new to assigned

Replying to anonymous:

I have tested this on 0.12, and it works great. Thanks

This is working well for me as well on Trac 0.11.7. I'm going to push this to the repository.

Initial testing makes me think that we might need to work on improving the search results a bit.

Replying to anonymous:

i use python2.6 for "python setup.py bdist_egg" and could not be display correctly

Please try the new version from the repository, and if you continue to have these issues, please open a new ticket with your installation details and cc me on the ticket.

comment:5 in reply to: ↑ 4 Changed 4 years ago by rjollos

Replying to rjollos:

Initial testing makes me think that we might need to work on improving the search results a bit.

Looks like I had an error in the initial code, and its working great now.

comment:6 Changed 4 years ago by rjollos

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

(In [8716]) Bundled for installation as an egg. Now uses ITemplateStreamFilter so that template source code does not need to be modified. Patch by Chris Heller. Fixes #6963.

Add Comment

Modify Ticket

Action
as closed .
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.