Modify

Opened 15 years ago

Closed 13 years ago

#5486 closed enhancement (fixed)

[Patch] "Back to ticket #X" should be located in contextual navigation

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: high Component: TicketModifiedFilesPlugin
Severity: minor Keywords: patch
Cc: Trac Release: 0.11

Description

It would be more consistent with the layout of Trac if the "Back to ticket #X." link appeared in the contextual navigation rather than at the bottom of the page. For instance, when you select a particular ticket from a report page, the contextual navigation contains: | ← Previous Ticket | Back to Query | Next Ticket → |

Attachments (2)

ticketmodifiedfiles.html.patch (940 bytes) - added by Ryan J Ollos 15 years ago.
Patch for ticketmodifiedfiles.html
ctxtnav.patch (1.8 KB) - added by Ryan J Ollos 14 years ago.
Improved patch

Download all attachments as: .zip

Change History (22)

comment:1 Changed 15 years ago by anonymous

Type: defectenhancement

comment:2 Changed 15 years ago by Emilien Klein

Severity: normalminor

Are you familiar with trac plugins creation? If no, this might be a good opportunity to start by creating a patch so that the "Back to ticket #X" link appears in the contextual navigation ;)

I have to admit that I don't have much time to develop this myself, so if you want to see this enhancement I'd be happy to review any patch that you submit.

comment:3 in reply to:  2 Changed 15 years ago by anonymous

Hi,

I am not familiar with Trac development, or event Python for that matter (my experience is with C/C++/C# and MATLAB), but I am somewhat familiar with Trac administration and intend to learn to do plug-in development.

I see that there is some fairly nice looking development documentation so I imagine it will be fairly straightforward to get started. Thank you for offering to review the patch. I will let you know what I have within a few weeks.

  • Ryan

Replying to e2jk:

Are you familiar with trac plugins creation? If no, this might be a good opportunity to start by creating a patch so that the "Back to ticket #X" link appears in the contextual navigation ;)

I have to admit that I don't have much time to develop this myself, so if you want to see this enhancement I'd be happy to review any patch that you submit.

comment:4 Changed 15 years ago by Emilien Klein

The documentation is pretty good, in fact this was my first Trac plugin and I did it all following the documentation. And Python is really not hard, learning it could be of great use to you. If you need a good Python resource, I greatly recommend Dive Into Python: http://diveintopython.org/

Have fun learning! I hope to hear back from you in a few weeks!

comment:5 Changed 15 years ago by Emilien Klein

Priority: normallowest
Status: newassigned

comment:6 in reply to:  2 Changed 15 years ago by Ryan J Ollos

Owner: changed from Emilien Klein to Ryan J Ollos
Status: assignednew

Replying to e2jk:

Are you familiar with trac plugins creation? If no, this might be a good opportunity to start by creating a patch so that the "Back to ticket #X" link appears in the contextual navigation ;)

Hello again,

I have created a patch to address this enhancement. It took me quite a while to get up and running with the Trac install, but after that, it was a fairly straightforward enhancement. I will upload shortly.

  • Ryan

Changed 15 years ago by Ryan J Ollos

Patch for ticketmodifiedfiles.html

comment:7 Changed 15 years ago by Ryan J Ollos

Hello,

I have one other quick question for you. Although the plugin install seemed to go fine, I was seeing an error at the very end of the output of the install. The presumed error is bad local file header. I installed the plugin by checking out from svn and using easy_install. When I made a change to the source, I would run easy_install again and restart apache. That seemed to effectively 'upgrade' the plugin.

rjollos@pc-rjollos-ubuntu-server-9:~/ticketmodifiedfilesplugin$ sudo easy_install 0.11
Processing 0.11
Running setup.py -q bdist_egg --dist-dir /home/rjollos/ticketmodifiedfilesplugin/0.11/egg-dist-tmp-Bo_lYC
zip_safe flag not set; analyzing archive contents...
TicketModifiedFiles 1.00 is already the active version in easy-install.pth

Installed /usr/local/lib/python2.6/dist-packages/TicketModifiedFiles-1.00-py2.6.egg
Processing dependencies for TicketModifiedFiles==1.00
Traceback (most recent call last):
  File "/usr/local/bin/easy_install", line 8, in <module>
    load_entry_point('setuptools==0.6c9', 'console_scripts', 'easy_install')()
  File "/usr/local/lib/python2.6/dist-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 1671, in main
    
  File "/usr/local/lib/python2.6/dist-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 1659, in with_ei_usage
    
  File "/usr/local/lib/python2.6/dist-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 1675, in <lambda>
    
  File "/usr/lib/python2.6/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib/python2.6/distutils/dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python2.6/dist-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 211, in run
    
  File "/usr/local/lib/python2.6/dist-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 427, in easy_install
    
  File "/usr/local/lib/python2.6/dist-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 478, in install_item
    
  File "/usr/local/lib/python2.6/dist-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py", line 519, in process_distribution
    
  File "/usr/local/lib/python2.6/dist-packages/setuptools-0.6c9-py2.6.egg/pkg_resources.py", line 529, in resolve
    requirements.extend(dist.requires(req.extras)[::-1])
  File "/usr/local/lib/python2.6/dist-packages/setuptools-0.6c9-py2.6.egg/pkg_resources.py", line 2108, in requires
    dm = self._dep_map
  File "/usr/local/lib/python2.6/dist-packages/setuptools-0.6c9-py2.6.egg/pkg_resources.py", line 2100, in _dep_map
    for extra,reqs in split_sections(self._get_metadata(name)):
  File "/usr/local/lib/python2.6/dist-packages/setuptools-0.6c9-py2.6.egg/pkg_resources.py", line 2519, in split_sections
    for line in yield_lines(s):
  File "/usr/local/lib/python2.6/dist-packages/setuptools-0.6c9-py2.6.egg/pkg_resources.py", line 1813, in yield_lines
    for ss in strs:
  File "/usr/local/lib/python2.6/dist-packages/setuptools-0.6c9-py2.6.egg/pkg_resources.py", line 2122, in _get_metadata
    for line in self.get_metadata_lines(name):
  File "/usr/local/lib/python2.6/dist-packages/setuptools-0.6c9-py2.6.egg/pkg_resources.py", line 1140, in get_metadata_lines
    return yield_lines(self.get_metadata(name))
  File "/usr/local/lib/python2.6/dist-packages/setuptools-0.6c9-py2.6.egg/pkg_resources.py", line 1137, in get_metadata
    return self._get(self._fn(self.egg_info,name))
  File "/usr/local/lib/python2.6/dist-packages/setuptools-0.6c9-py2.6.egg/pkg_resources.py", line 1197, in _get
    return self.loader.get_data(path)
zipimport.ZipImportError: bad local file header in /usr/local/lib/python2.6/dist-packages/TicketModifiedFiles-1.00-py2.6.egg

comment:8 Changed 15 years ago by Ryan J Ollos

Status: newassigned

comment:9 Changed 14 years ago by anonymous

Summary: "Back to ticket #X" should be located in contextual navigation[Patch] "Back to ticket #X" should be located in contextual navigation

comment:10 Changed 14 years ago by Ryan J Ollos

Owner: changed from Ryan J Ollos to Emilien Klein
Status: assignednew

Improved patch is attached: ctxtnav.patch.

Changed 14 years ago by Ryan J Ollos

Attachment: ctxtnav.patch added

Improved patch

comment:11 Changed 14 years ago by Ryan J Ollos

The first attempt I made at this patch was to modify the template, which was incorrect. The correct way was using the add_ctxtnav function. Tested under Trac 0.11.7stable-r9029.

comment:12 Changed 14 years ago by Ryan J Ollos

Hello,

Just wanted to inquire as to whether you might be able to apply this simple patch to the trunk.

Thanks,

  • Ryan

comment:13 Changed 14 years ago by Emilien Klein

Hi Ryan,

This is on my TODO list, but I haven't found the time to test it yet. I'll have a look at it soon...

comment:14 Changed 13 years ago by Ryan J Ollos

If its okay with you, I'd like to just go ahead and apply the patch. Its a simple patch and I have global r/w access, so I could commit it given the go-ahead by you ;)

comment:15 Changed 13 years ago by Emilien Klein

Hi rjollos,

As I am no longer working for my previous company Rentalia, I have to ask them permission before (they wanted to add a specific term in the licence). I have thus sent them an email to ask if the patch can be applied, and also (more importantly IMO) if we can release this plugin to the community, and have someone adopt it.

I will let you know, so please don't apply the patch in the meantime.

Just a question, would you potentially be interested in owning this plugin?

comment:16 in reply to:  15 Changed 13 years ago by Ryan J Ollos

Replying to e2jk:

I will let you know, so please don't apply the patch in the meantime.

Certainly.

Just a question, would you potentially be interested in owning this plugin?

I'd be happy to take over maintainership.

comment:17 Changed 13 years ago by Emilien Klein

Keywords: patch added

comment:18 Changed 13 years ago by Emilien Klein

Owner: changed from Emilien Klein to Ryan J Ollos

Reassigning as part of maintainership transfer of TicketModifiedFiles to rjollos.

comment:19 Changed 13 years ago by Ryan J Ollos

Priority: lowesthigh
Status: newassigned

comment:20 Changed 13 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

(In [9703]) Moved 'Back to Ticket #X' link to the contextual navigation. Fixes #5486.

Modify Ticket

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