Commit Graph

199 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 ffe1c9b652 Overhaul default access lists (API) 2021-09-24 08:21:04 +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 dedc26ad97 API: Fix Flask 2.0.x incompatible blueprint names 2021-05-26 10:05:23 -04:00
Drew DeVault 5efd6ba260 Fix misc. exception sources 2021-01-21 19:49:09 -05:00
Drew DeVault 8795dcb33b tickets: triage access is required for labelling 2021-01-11 09:06:12 -05:00
Drew DeVault 718feb66ef /:owner/:tracker/labels: Fix 500 on missing tracker 2020-10-31 11:17:26 -04:00
Thorben Günther 999fe57e35 API: Autosubscribe owners to created trackers 2020-10-31 10:52:25 -04:00
Drew DeVault ba12050c5f API: fix error with editing comments
This was fixed earlier in the web blueprints but the API was never
updated accordingly.
2020-10-20 10:39:50 -04:00
наб bb5a0a8ccf Add option to notify users of their own web activity
Ref: ~sircmpwn/todo.sr.ht#94
2020-10-10 14:00:58 -04:00
Drew DeVault 68e1a17b2a Omit description from tracker search 2020-09-15 10:36:34 -04:00
Drew DeVault 2687448c09 Use last event when editing a comment, not only 2020-09-03 11:09:54 -04:00
наб bd57379c99 Correctly scroll down to the new comment after posting
I was redirected to
  https://todo.sr.ht/~sircmpwn/lists.sr.ht/67#comment-13819
after posting, whereas the correct URL is
  https://todo.sr.ht/~sircmpwn/lists.sr.ht/67#event-47645
2020-08-28 09:00:58 -04:00
наб f368e772f3 Don't create useless transitions between identical states and clean previous ones with migration
A FIXED -> FIXED transition happens, e.g., here:
  https://todo.sr.ht/~sircmpwn/meta.sr.ht/46#event-47525
because I fucked up a link and listed this one twice,
and Drew opened each link first, then closed them,
hence marking the ticket as FIXED twice

With this patch, we just do nothing if there's nothing to do
2020-08-26 09:34:30 -04:00
Drew DeVault 85a7f0f6e1 API: add route to edit comments 2020-08-25 15:47:58 -04:00
Drew DeVault deb31fb00e Implement ticket editing in the UI 2020-08-25 15:47:58 -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
Drew DeVault 9450ca6437 API: ticket by ID: abort 404 if no ticket 2020-08-10 12:29:32 -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
Drew DeVault 9554487777 Settings import: abort(400) on invalid dump 2020-08-05 16:32:27 -04:00
наб caaab0c2c1 Show subscription mailto: links to anonymous users
As suggested in <C4DCAJR6LQD2.GBNNZ1ME6L4N@homura>
2020-07-30 08:52:18 -04:00
наб 4270950afe Add Tracker.ref() à la Ticket.ref(), replacing manual construxions 2020-07-22 13:19:56 -04:00
наб eff4ea1d86 Don't reacquire participant in ~u/t/enable_notifications handler 2020-07-22 13:19:55 -04:00
Drew DeVault eed8f8f697 API: add integer specification to route params 2020-07-06 12:47:05 -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 6ac582e3b6 Add preview when editing tickets 2020-05-22 15:47:23 -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
Drew DeVault 5dbc2a862d API: set default ticket description to empty string 2020-05-05 11:53:21 -04:00
Drew DeVault 812fdafd40 API: reuse tracker deletion hack from web UI 2020-05-05 11:44:51 -04:00
Drew DeVault 861b1dbc6c API: don't require description for new tickets
This matches the behavior of the web UI.
2020-05-05 11:30:57 -04:00
Drew DeVault 5ca816a2ae Fix markup cache invalidation 2020-03-31 11:51:24 -04:00
Drew DeVault 6a920745a8 Update permissions for todo.sr.ht views
Similar to the recent lists.sr.ht fix.
2020-03-02 14:41:10 -05:00
Drew DeVault 6fb8715938 API: fix invalid reference to TicketStatus.open
The appropriate field is TicketStatus.reported
2020-02-15 14:34:45 -05: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 5107537673 API: return early if label is not found
Otherwise we get a nil deference later on
2020-01-14 20:55:49 -05:00
Drew DeVault fe08cd4447 Implement ticket import 2020-01-09 12:19:44 -05:00
Ivan Habunek 45fb4cf3e4 Implement preview for comments
Adds a "Preview" button alongside "Comment". Clicking this button
renders the comment text without actually creating the comment.

https://todo.sr.ht/~sircmpwn/todo.sr.ht/195
2020-01-07 10:08:56 -05:00
Drew DeVault 856ad5b04e Updates for single-sign-on support 2019-11-30 10:17:42 -05:00
Drew DeVault 08c832449d api/__init__.py: import abort from flask 2019-11-16 19:40:59 -05:00
Drew DeVault d015cff999 Fix routing to details_GET from create 2019-11-06 11:14:53 -05:00
Drew DeVault f22c84e254 Sign parts of the data export for trackers 2019-11-04 17:13:44 -05:00
Drew DeVault 51fa778624 Specify mimetype for data export 2019-11-04 16:42:17 -05:00
Drew DeVault e8fc507ea1 Implement tracker data export 2019-11-04 16:31:38 -05:00