FossilRepo

Default ticket list to Open filter; sort already newest-first

ragelink 2026-04-08 14:24 trunk
Commit 61e8e0a167e71142e3c266b8f069192d48cccfb4312610c4ad72a9ae4708c231
+3 -1
--- fossil/views.py
+++ fossil/views.py
@@ -725,11 +725,13 @@
725725
726726
727727
def ticket_list(request, slug):
728728
project, fossil_repo, reader = _get_repo_and_reader(slug, request)
729729
730
- status_filter = request.GET.get("status", "")
730
+ status_filter = request.GET.get("status", "Open")
731
+ if status_filter == "All":
732
+ status_filter = ""
731733
search = request.GET.get("search", "").strip()
732734
page = int(request.GET.get("page", "1"))
733735
per_page = get_per_page(request, default=50)
734736
735737
with reader:
736738
--- fossil/views.py
+++ fossil/views.py
@@ -725,11 +725,13 @@
725
726
727 def ticket_list(request, slug):
728 project, fossil_repo, reader = _get_repo_and_reader(slug, request)
729
730 status_filter = request.GET.get("status", "")
 
 
731 search = request.GET.get("search", "").strip()
732 page = int(request.GET.get("page", "1"))
733 per_page = get_per_page(request, default=50)
734
735 with reader:
736
--- fossil/views.py
+++ fossil/views.py
@@ -725,11 +725,13 @@
725
726
727 def ticket_list(request, slug):
728 project, fossil_repo, reader = _get_repo_and_reader(slug, request)
729
730 status_filter = request.GET.get("status", "Open")
731 if status_filter == "All":
732 status_filter = ""
733 search = request.GET.get("search", "").strip()
734 page = int(request.GET.get("page", "1"))
735 per_page = get_per_page(request, default=50)
736
737 with reader:
738
--- templates/fossil/ticket_list.html
+++ templates/fossil/ticket_list.html
@@ -6,11 +6,11 @@
66
{% include "fossil/_project_nav.html" %}
77
88
<div class="flex flex-wrap items-center justify-between gap-3 mb-4">
99
<div class="flex flex-wrap items-center gap-2 text-xs text-gray-500">
1010
<span>Status:</span>
11
- <a href="{% url 'fossil:tickets' slug=project.slug %}"
11
+ <a href="{% url 'fossil:tickets' slug=project.slug %}?status=All"
1212
class="rounded-full px-2.5 py-1 {% if not status_filter %}bg-brand text-white{% else %}bg-gray-800 text-gray-400 hover:text-white border border-gray-700{% endif %}">All</a>
1313
<a href="{% url 'fossil:tickets' slug=project.slug %}?status=Open"
1414
class="rounded-full px-2.5 py-1 {% if status_filter == 'Open' %}bg-brand text-white{% else %}bg-gray-800 text-gray-400 hover:text-white border border-gray-700{% endif %}">Open</a>
1515
<a href="{% url 'fossil:tickets' slug=project.slug %}?status=Fixed"
1616
class="rounded-full px-2.5 py-1 {% if status_filter == 'Fixed' %}bg-brand text-white{% else %}bg-gray-800 text-gray-400 hover:text-white border border-gray-700{% endif %}">Fixed</a>
1717
--- templates/fossil/ticket_list.html
+++ templates/fossil/ticket_list.html
@@ -6,11 +6,11 @@
6 {% include "fossil/_project_nav.html" %}
7
8 <div class="flex flex-wrap items-center justify-between gap-3 mb-4">
9 <div class="flex flex-wrap items-center gap-2 text-xs text-gray-500">
10 <span>Status:</span>
11 <a href="{% url 'fossil:tickets' slug=project.slug %}"
12 class="rounded-full px-2.5 py-1 {% if not status_filter %}bg-brand text-white{% else %}bg-gray-800 text-gray-400 hover:text-white border border-gray-700{% endif %}">All</a>
13 <a href="{% url 'fossil:tickets' slug=project.slug %}?status=Open"
14 class="rounded-full px-2.5 py-1 {% if status_filter == 'Open' %}bg-brand text-white{% else %}bg-gray-800 text-gray-400 hover:text-white border border-gray-700{% endif %}">Open</a>
15 <a href="{% url 'fossil:tickets' slug=project.slug %}?status=Fixed"
16 class="rounded-full px-2.5 py-1 {% if status_filter == 'Fixed' %}bg-brand text-white{% else %}bg-gray-800 text-gray-400 hover:text-white border border-gray-700{% endif %}">Fixed</a>
17
--- templates/fossil/ticket_list.html
+++ templates/fossil/ticket_list.html
@@ -6,11 +6,11 @@
6 {% include "fossil/_project_nav.html" %}
7
8 <div class="flex flex-wrap items-center justify-between gap-3 mb-4">
9 <div class="flex flex-wrap items-center gap-2 text-xs text-gray-500">
10 <span>Status:</span>
11 <a href="{% url 'fossil:tickets' slug=project.slug %}?status=All"
12 class="rounded-full px-2.5 py-1 {% if not status_filter %}bg-brand text-white{% else %}bg-gray-800 text-gray-400 hover:text-white border border-gray-700{% endif %}">All</a>
13 <a href="{% url 'fossil:tickets' slug=project.slug %}?status=Open"
14 class="rounded-full px-2.5 py-1 {% if status_filter == 'Open' %}bg-brand text-white{% else %}bg-gray-800 text-gray-400 hover:text-white border border-gray-700{% endif %}">Open</a>
15 <a href="{% url 'fossil:tickets' slug=project.slug %}?status=Fixed"
16 class="rounded-full px-2.5 py-1 {% if status_filter == 'Fixed' %}bg-brand text-white{% else %}bg-gray-800 text-gray-400 hover:text-white border border-gray-700{% endif %}">Fixed</a>
17

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button