code.djangoproject.com icon indicating copy to clipboard operation
code.djangoproject.com copied to clipboard

Filing a new bug when you're not logged in is *extremely* difficult

Open mlissner opened this issue 6 years ago • 4 comments

I just spent ten minutes trying to figure out where the "New Ticket" button is. Alas, it only shows up if you're logged in and I didn't realize I wasn't logged in. If you're logged out you'll look around forever and ever just hoping to figure it out.

There's a lot of documentation about how to file new bugs, but at a skim it just talks about things to do first, how to handle security bugs, etc. Where's the link‽ :)

If there's a way to add a "New Ticket" link that redirects you to the login page, that'd be very helpful.

mlissner avatar Jan 24 '20 19:01 mlissner

Hi @mlissner I remember this being non-obvious to me also. Skimmers gonna skim. We do have this link in the README, which has a blaring warning to sign in.

In the wiki article at code.djangoproject.com we have:

To log a ticket, or add content to this wiki, log in with a GitHub account. (You may also ​create a DjangoProject account and log in with that account.)

Is your suggestion just to add a New Ticket link right after that paragraph? Could be solved with a wiki edit if so.

jacobtylerwalls avatar Jun 04 '21 14:06 jacobtylerwalls

Ah, there was a change to point folks away from /newticket and just to the homepage in https://github.com/django/django/pull/6700, so maybe increasing redundancy is the answer. Put a more obvious "new ticket" link in the wiki article so that when we send you to the wiki, if you're a skimmer you (ideally) struggle less.

The link could read New ticket (login required).

jacobtylerwalls avatar Jun 04 '21 14:06 jacobtylerwalls

I guess my solution would be to make the New Ticket link always appear. If you click it when you're logged out, you go to the login page with a redirect to the new ticket page. No idea if that's practical.

mlissner avatar Jun 04 '21 15:06 mlissner

The nav buttons come from Trac, so based on this (very old) comment I was able to get close. Haven't ported CSS, etc. I think the missing extra buttons could be because I haven't granted my anonymous user permissions for viewing the wiki. All to say -- before going further would be nice to get a reaction from somebody who's worked more with Trac.

diff --git a/DjangoPlugin/tracdjangoplugin/__init__.py b/DjangoPlugin/tracdjangoplugin/__init__.py
index d4845e1..41d2010 100644
--- a/DjangoPlugin/tracdjangoplugin/__init__.py
+++ b/DjangoPlugin/tracdjangoplugin/__init__.py
@@ -52,6 +52,12 @@ class CustomNavigationBar(Component):
         return ''
 
     def get_navigation_items(self, req):
+        # Trac disables the New Ticket button in the main nav for logged out users, so create our own.
+        if 'TICKET_CREATE' not in req.perm:
+            return [
+                ('mainnav', 'new_ticket', tag.a('New Ticket', href=req.href.newticket())),
+                ('mainnav', 'custom_reports', Markup('<a href="%s">Reports</a>' % req.href.wiki('Reports'))),
+            ]
         return [
             ('mainnav', 'custom_reports', Markup('<a href="%s">Reports</a>' % req.href.wiki('Reports'))),
         ]

Screen Shot 2021-06-06 at 10 46 19 AM


And at least that would take you to the current /newticket with a blaring warning to sign in. There are two login forms so I don't know about choosing one and adding a redirect.

jacobtylerwalls avatar Jun 06 '21 14:06 jacobtylerwalls