Commit Graph

114 Commits

Author SHA1 Message Date
Ignas Kiela 03f8983945 Remove TicketSeen
Has a fair amount of complexity for not much gain.
2021-12-20 10:15:17 +01:00
Ignas Kiela d75f0e5a29 Join submitters on tracker page loads
Currently it takes ~27 SQL round trips to render a tracker page,
this should remove most of those roundtrips, and improve the
performance of the page (right now it takes ~300ms on average)
2021-12-13 09:29:49 +01:00
Drew DeVault 49b48dd98e Improve private tracker access case
This fixes a bug with the ticket query, and also returns 401 for private
trackers where the user does not have any access permissions.
2021-10-06 10:27:57 +02:00
Drew DeVault d2f57b98c1 Overhaul default access lists (web)
The changes are:

- Introduce a visibility column, similar to git.sr.ht et al
- Consolodate the default access columns into one
2021-09-24 08:21:04 +02:00
Drew DeVault 4521acc3ca tracker: drop subqueryload on ticket query
This was having some bugs where the participant could end up as None in
some unusual cases.
2021-09-17 10:56:07 +02:00
Ivan Habunek 87ff71d4af Store ticket comment counts in the database
This saves a query when rendering the tracker page, and allows sorting
by comment count which can be given as a sorting option.
2021-09-14 12:40:41 +02:00
Ivan Habunek 8b056f3d30 Implement sorting in ticket search
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.
2021-09-14 12:40:40 +02:00
Drew DeVault 5efd6ba260 Fix misc. exception sources 2021-01-21 19:49:09 -05:00
Drew DeVault 718feb66ef /:owner/:tracker/labels: Fix 500 on missing tracker 2020-10-31 11:17:26 -04:00
наб 25ef1808bf Don't require login to browse tracker labels
Anonymous access is equivalent to logged-in non-owner here
2020-08-11 10:48:26 -04:00
наб 79212efcc4 Allow 50-character labels, as the error message suggests
Ref: ~sircmpwn/todo.sr.ht#181
2020-08-10 10:22:59 -04:00
наб caaab0c2c1 Show subscription mailto: links to anonymous users
As suggested in <C4DCAJR6LQD2.GBNNZ1ME6L4N@homura>
2020-07-30 08:52:18 -04:00
наб eff4ea1d86 Don't reacquire participant in ~u/t/enable_notifications handler 2020-07-22 13:19:55 -04:00
Benjamin Lowry 095e199d3e redirect to correct page when creating & configuring tracker
Use canonical_name to redirect to the tracker page with
a tilde before the username.

Signed-off-by: Benjamin Lowry <ben@ben.gmbh>
2020-06-08 13:42:39 -04:00
Ivan Habunek 5a123a5872 Add preview when creating tickets 2020-05-22 15:47:23 -04:00
Drew DeVault 4fc244d3ea tracker: allow 2 character labels 2020-05-20 14:35:48 -04:00
Ivan Habunek 7f0ba0bcb0 Refactor search to work with new core search code
Implements inverse searches using !, adds status:any, and some
optimizations.
2020-02-11 11:58:17 -05:00
Ivan Habunek e885f90876 Handle search errors 2020-02-11 11:58:16 -05:00
Drew DeVault 856ad5b04e Updates for single-sign-on support 2019-11-30 10:17:42 -05:00
Drew DeVault d015cff999 Fix routing to details_GET from create 2019-11-06 11:14:53 -05:00
Drew DeVault 2fb6bc8d13 Split settings into separate blueprint 2019-11-04 16:15:37 -05:00
Drew DeVault 6ce73b2489 Fix editing of labels with / in the name 2019-11-01 11:15:31 -04:00
Ivan Habunek 7d018e76e1 Implement editing labels
as requested in https://todo.sr.ht/~sircmpwn/todo.sr.ht/159
2019-10-26 11:05:43 -04:00
Ivan Habunek 62b8fe82da Set ticket title and description with URL params
Setting ?title=foo&description=bar to the tracker page will
automatically populate the title and description inputs. This can be
useful for crafting error-reporting links.
2019-10-26 10:56:22 -04:00
Drew DeVault e978ebc006 Correct "get_participant_by_user" -> "for_user" 2019-08-24 09:07:41 +09:00
Drew DeVault b46f03ea64 Fix enable/disable notifications 2019-08-23 08:55:08 +09:00
Drew DeVault b4c92a39db Generalize users into participants 2019-08-22 11:05:25 +09:00
Ivan Habunek 51aa558ba4 Add username completion to tracker access page 2019-08-12 10:29:18 +09:00
Drew DeVault 4516d8717b Use srht.flask.session instead of flask.session 2019-07-12 14:13:40 -04:00
Ivan Habunek 9b26e7cbf3 Add CRUD views for UserAccess 2019-07-05 12:34:30 -04:00
Drew DeVault ae2797dd8d Rig up tracker webhooks 2019-06-10 15:20:05 -04:00
Drew DeVault 3713575d90 Add initial set of webhooks 2019-06-10 13:23:24 -04:00
Ivan Habunek aaad330244 Replace overriden __init__ with factory method
Simplifies mocking, fixes factories.
2019-05-21 10:22:29 -04:00
Drew DeVault 0fef4f97c3 Fix create & configure tracker 2019-05-09 21:21:07 -04:00
Drew DeVault 785574871c Initial pass on API support
Adds an API for working with trackers
2019-04-30 15:12:05 -04:00
Ivan Habunek 059faa8d73 Simplify ticket submission code 2019-03-06 14:37:17 -07:00
Ivan Habunek ee2e052e2a Extract ticket submission logic, add tests
No functional changes to ticket submission code.
2019-03-06 14:37:05 -07:00
Drew DeVault 879a3b80fb Use @loginrequired after route decorator 2019-02-21 22:05:19 -05:00
Drew DeVault 50c4fc68ca Refactor search to use core.sr.ht search 2019-02-11 11:09:31 -05:00
Ivan Habunek e1824a287f Remove tilde hacks
No longer required, fixed in SrhtFlask.
2019-01-29 10:18:03 -05:00
Drew DeVault 01f734bd8c Updates per core.sr.ht OAuth changes 2018-12-30 15:52:29 -05:00
Ivan Habunek 2dd9baeaf8 Improve code formatting 2018-12-14 17:41:23 -05:00
Ivan Habunek 09c486b9a1 Extract fetching comment counts 2018-12-14 17:41:23 -05:00
Ivan Habunek e21c1dcd01 Preload ticket labels and submitters
Reduces query count by 2 queries per ticket.
2018-12-14 17:41:23 -05:00
Ivan Habunek 40f66d5420 Preload seen tickets list
Loads the data in one query instead of one per ticket.
2018-12-14 17:41:23 -05:00
Drew DeVault 36c41f9ae7 Remove user agent from tickets 2018-12-14 10:17:43 -05:00
Drew DeVault 7510fb9f0c Fix routing on create & configure 2018-12-13 10:05:09 -05:00
Drew DeVault 8381642d66 Implement tracker deletion 2018-12-12 22:48:43 -05:00
Drew DeVault b0d6e23ce2 Split tracker settings into tabs 2018-12-12 22:06:31 -05:00
Drew DeVault ed0948365b Fix unpacking of non-tuple 2018-12-04 12:05:26 -05:00