~ihabunek

Zagreb, Croatia

~ihabunek/toot-discuss

Last active a month ago

~ihabunek/triglav-discuss

Last active 8 months ago
View more

Recent activity

[PATCH sr.ht-docs v3] todo.sr.ht: Document sorting a month ago

From Ivan Habunek to ~sircmpwn/sr.ht-dev

---
 todo.sr.ht/index.md | 27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/todo.sr.ht/index.md b/todo.sr.ht/index.md
index 2ba29c7..e781488 100644
--- a/todo.sr.ht/index.md
+++ b/todo.sr.ht/index.md
@@ -32,14 +32,37 @@ include:
- `status:open` or `status:closed`
- `label`: an optional label that is assigned to a ticket for organizational
  purposes
- `order`: the order in which tickets are displayed. By default this is by
  time of last update
[message trimmed]

[PATCH todo.sr.ht v4 2/3] Store ticket comment counts in the database a month ago

From Ivan Habunek to ~sircmpwn/sr.ht-dev

This saves a query when rendering the tracker page, and allows sorting
by comment count which can be given as a sorting option.
---
 .../6099fe670392_add_ticket_comment_count.py  | 32 +++++++++++++++++++
 todosrht/blueprints/tracker.py                |  8 ++---
 todosrht/templates/tracker.html               |  7 ++--
 todosrht/tickets.py                           | 15 +++++----
 todosrht/types/ticket.py                      |  1 +
 5 files changed, 46 insertions(+), 17 deletions(-)
 create mode 100644 todosrht/alembic/versions/6099fe670392_add_ticket_comment_count.py

diff --git a/todosrht/alembic/versions/6099fe670392_add_ticket_comment_count.py b/todosrht/alembic/versions/6099fe670392_add_ticket_comment_count.py
new file mode 100644
index 0000000..4bbd20b
[message trimmed]

[PATCH todo.sr.ht v4 3/3] Allow sorting by number of comments a month ago

From Ivan Habunek to ~sircmpwn/sr.ht-dev

---
 todosrht/search.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/todosrht/search.py b/todosrht/search.py
index d1aa98f..1ca28a0 100644
--- a/todosrht/search.py
+++ b/todosrht/search.py
@@ -107,6 +107,7 @@ def apply_search(query, search_string, current_user):
    return apply_sort(query, sort_terms, {
        "created": Ticket.created,
        "updated": Ticket.updated,
        "comments": Ticket.comment_count,
    })
[message trimmed]

[PATCH todo.sr.ht v4 1/3] Implement sorting in ticket search a month ago

From Ivan Habunek to ~sircmpwn/sr.ht-dev

By default tickets are sorted by updated DESC, if not otherwise defined.

Sort order is defined by entering `sort:<term>` in the search box where
`<term>` can be one of `updated` or `created`. More terms can be added
later.

Sort order is descending by default, it can be reversed by specifying
`rsort:<term>` instead.
---
 tests/test_search.py            | 112 ++++++++++++++++++++++----------
 todosrht/blueprints/tracker.py  |   3 +-
 todosrht/search.py              |  38 ++++++++++-
 todosrht/templates/tracker.html |   2 +-
 4 files changed, 113 insertions(+), 42 deletions(-)
[message trimmed]

[sr.ht-docs v2] todo.sr.ht: Document sorting a month ago

From Ivan Habunek to ~sircmpwn/sr.ht-dev

---
v2 changes how reverse sort is applied - `rsort:term` replaces
`sort:-term`.

 todo.sr.ht/index.md | 27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)

diff --git a/todo.sr.ht/index.md b/todo.sr.ht/index.md
index 2ba29c7..e781488 100644
--- a/todo.sr.ht/index.md
+++ b/todo.sr.ht/index.md
@@ -32,14 +32,37 @@ include:
- `status:open` or `status:closed`
- `label`: an optional label that is assigned to a ticket for organizational
[message trimmed]

[todo.sr.ht v3 3/3] Allow sorting by number of comments a month ago

From Ivan Habunek to ~sircmpwn/sr.ht-dev

---
 todosrht/search.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/todosrht/search.py b/todosrht/search.py
index d1aa98f..1ca28a0 100644
--- a/todosrht/search.py
+++ b/todosrht/search.py
@@ -107,6 +107,7 @@ def apply_search(query, search_string, current_user):
    return apply_sort(query, sort_terms, {
        "created": Ticket.created,
        "updated": Ticket.updated,
        "comments": Ticket.comment_count,
    })
[message trimmed]

[todo.sr.ht v3 2/3] Store ticket comment counts in the database a month ago

From Ivan Habunek to ~sircmpwn/sr.ht-dev

This saves a query when rendering the tracker page, and allows sorting
by comment count which can be given as a sorting option.
---
 .../6099fe670392_add_ticket_comment_count.py  | 32 +++++++++++++++++++
 todosrht/blueprints/tracker.py                |  8 ++---
 todosrht/templates/tracker.html               |  7 ++--
 todosrht/tickets.py                           | 15 +++++----
 todosrht/types/ticket.py                      |  1 +
 5 files changed, 46 insertions(+), 17 deletions(-)
 create mode 100644 todosrht/alembic/versions/6099fe670392_add_ticket_comment_count.py

diff --git a/todosrht/alembic/versions/6099fe670392_add_ticket_comment_count.py b/todosrht/alembic/versions/6099fe670392_add_ticket_comment_count.py
new file mode 100644
index 0000000..4bbd20b
[message trimmed]

[todo.sr.ht v3 1/3] Implement sorting in ticket search a month ago

From Ivan Habunek to ~sircmpwn/sr.ht-dev

By default tickets are sorted by updated DESC, if not otherwise defined.

Sort order is defined by entering `sort:<term>` in the search box where
`<term>` can be one of `updated` or `created`. More terms can be added
later.

Sort order is descending by default, it can be reversed by specifying
`rsort:<term>` instead.
---
 tests/test_search.py            | 112 ++++++++++++++++++++++----------
 todosrht/blueprints/tracker.py  |   3 +-
 todosrht/search.py              |  38 ++++++++++-
 todosrht/templates/tracker.html |   2 +-
 4 files changed, 113 insertions(+), 42 deletions(-)
[message trimmed]

[PATCH sr.ht-docs] todo.sr.ht: Document sorting a month ago

From Ivan Habunek to ~sircmpwn/sr.ht-dev

---
 todo.sr.ht/index.md | 26 ++++++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/todo.sr.ht/index.md b/todo.sr.ht/index.md
index 2ba29c7..4cdae20 100644
--- a/todo.sr.ht/index.md
+++ b/todo.sr.ht/index.md
@@ -32,14 +32,36 @@ include:
- `status:open` or `status:closed`
- `label`: an optional label that is assigned to a ticket for organizational
  purposes
- `order`: the order in which tickets are displayed. By default this is by
  time of last update
[message trimmed]

[PATCH todo.sr.ht v2 3/3] Allow sorting by number of comments a month ago

From Ivan Habunek to ~sircmpwn/sr.ht-dev

---
 todosrht/search.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/todosrht/search.py b/todosrht/search.py
index f1b66a8..c27996c 100644
--- a/todosrht/search.py
+++ b/todosrht/search.py
@@ -109,6 +109,7 @@ def apply_search(query, search_string, current_user):
    return apply_sort(query, sort_terms, {
        "created": Ticket.created,
        "updated": Ticket.updated,
        "comments": Ticket.comment_count,
    })
[message trimmed]