Commit Graph

582 Commits

Author SHA1 Message Date
Ivan Habunek 9ca4b4580a Fix factories to not assign IDs
IDs should be assigned by the database. When assigned by sequence, it
causes conflicts if an object is created by other means than that
factory.

Also fixes a bug in testing ticket mentions which accidentally worked
because ticket.scoped_id was always the same as ticket.id.
2019-03-06 14:37:11 -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
Liam Cottam 93f5e7f6ab Allow filtering by no assignee and label 2019-03-01 14:34:49 -07:00
Drew DeVault f6feb3fcaa Fix tracker description null in tracker-labels.html 2019-02-27 09:06:57 -05:00
Liam Cottam 6a95fdbd1b Fix label text colour
Simple fix, prevents it from descending into all subchild anchors
(namely labels).

Fixes: https://todo.sr.ht/~sircmpwn/todo.sr.ht/161
2019-02-27 09:01:45 -05:00
Ivan Habunek 29f1b0aa13 Document the user mention pattern in code 2019-02-27 09:01:45 -05:00
Ivan Habunek d8a0e7ac0a Fix user mention regex not to match URLs
This was a problem since URLs oftern contain usernames.

fixes: https://todo.sr.ht/~sircmpwn/todo.sr.ht/162
2019-02-27 09:01:43 -05:00
Ivan Habunek ac1d6c3c33 Remove duplicate tilde in tests
canonical_name already includes it.
2019-02-27 09:01:42 -05:00
Drew DeVault ca23127257 Fix null tracker descriptions 2019-02-27 08:45:22 -05:00
Drew DeVault a40a84df4d Fix null ticket description in events.html 2019-02-26 17:53:23 -05:00
Drew DeVault 1f920a01ea Simplify status change event view 2019-02-26 15:33:11 -05:00
Drew DeVault d1587fbabf Detect duplicate tickets in parent ticket list 2019-02-26 15:30:01 -05:00
Drew DeVault 6980b98add Improve ticket reference event markdown 2019-02-26 15:26:12 -05:00
Drew DeVault befde3f8f6 Fix exception on ticket resolution with no comment 2019-02-26 15:26:01 -05:00
Drew DeVault 10ccf74ebd Fix top-level blockquote style in ticket comments 2019-02-26 11:17:34 -05:00
Drew DeVault bd3e3c1113 Fix style of nested blockquotes in ticket comments 2019-02-26 11:15:49 -05:00
Drew DeVault 86d91385b3 Support old versions of py-redis 2019-02-25 20:47:39 -05:00
Drew DeVault e65cbf8006 Improve notification emails 2019-02-25 20:41:48 -05:00
Drew DeVault 385eec8806 Improve appearance of event list on ticket page 2019-02-25 20:30:32 -05:00
Ivan Habunek 179519ef5e Add events for user and ticket mentions 2019-02-25 20:00:52 -05:00
Ivan Habunek 9821cfa0a9 Cache rendered comments 2019-02-25 20:00:43 -05:00
Ivan Habunek bc24ccbefe Link users and tickets mentioned in comments
NB: caching added in later commit
2019-02-25 20:00:43 -05:00
Ivan Habunek a6a9b0dfca Send notifications to users mentioned in comments 2019-02-25 20:00:40 -05:00
Ivan Habunek 9e051e71b7 Implement ticket.ref()
Returning the ticket reference string ~user/tracker#scoped_id.
2019-02-25 20:00:38 -05:00
Ivan Habunek be993d8a07 Add function for finding user mentions 2019-02-25 20:00:35 -05:00
Drew DeVault 0be8d3cc0f Use gray-900 for tracker link color 2019-02-22 16:37:13 -05:00
Drew DeVault 4dcda4c690 Linkify ticket titles on tracker page 2019-02-22 16:35:22 -05:00
Drew DeVault 879a3b80fb Use @loginrequired after route decorator 2019-02-21 22:05:19 -05:00
Drew DeVault 02e9e2c28d Remove unused import 2019-02-13 14:32:25 -05:00
Drew DeVault 9c6a635733 Fix profile references in trackers.html 2019-02-13 14:20:23 -05:00
Drew DeVault 9dc904b0fe Source user profile info from database 2019-02-13 14:14:00 -05:00
Drew DeVault 7ccee085ad Use layout-full base where appropriate
Also removes todo.html entirely
2019-02-11 11:18:09 -05:00
Drew DeVault 50c4fc68ca Refactor search to use core.sr.ht search 2019-02-11 11:09:31 -05:00
Drew DeVault d84ecaa6e4 Update index to match new design 2019-02-06 17:03:28 -05:00
Drew DeVault f9df698542 Fix 80 col limit 2019-02-01 10:01:32 +01:00
Amin Bandali 82721175ca Add link relations to user's profile link
Addresses [0].  Also see [1].

[0]: https://todo.sr.ht/~sircmpwn/git.sr.ht/171
[1]: 486e1db125
2019-02-01 09:56:27 +01:00
Drew DeVault f18db136fe Simplify .builds/alpine.yml 2019-01-29 15:35:09 -05:00
Drew DeVault 4bde327b1b Update build manifests to use pkgkit 2019-01-29 15:18:25 -05:00
Drew DeVault f30fa6cb57 Ditch setuptools for distutils 2019-01-29 10:18:11 -05:00
Ivan Habunek e1824a287f Remove tilde hacks
No longer required, fixed in SrhtFlask.
2019-01-29 10:18:03 -05:00
Francis Dinh b1b61aaaa0 Add label to search placeholder 2019-01-29 10:17:59 -05:00
Ivan Habunek a56cdf8ab8 Fix ticket unique constraint definition
It was defined on the scoped_id.unique param instad of using
__table_args__, and not applied to the database.
2019-01-12 17:28:05 -05:00
Drew DeVault 45e859130b Add README.md 2019-01-08 18:08:01 -05:00
Ivan Habunek 81f78dba2d Filter tickets by assignee
ticket: https://todo.sr.ht/~sircmpwn/todo.sr.ht/139
2019-01-06 21:37:31 -05:00
Ivan Habunek aa53d787d3 Fix comment length validation
The error message says comments should be between 3 and 16384
characters, so make length comparison inclusive to make it so.
2019-01-06 21:37:29 -05:00
Ivan Habunek 00d024d01a Always assign current user on "Assign myself"
If a username was entered in the assign box and "Assign myself" clicked,
the code would look up the username instead of assigning current user.
The button would only work if no username was entered.
2019-01-06 21:37:27 -05:00
Ivan Habunek eae4543cf5 Show noone is assigned if no assign box rendered
When noone is assigned, and the user doesn't have the right to assign
someone, that <dd> is left empty and loses the spacing below. To improve
visuals, fill the <dd> with "no-one" in this case.
2019-01-06 21:37:25 -05:00
Ivan Habunek 8a9959eebf Don't break JS if no comment or assign html exists
e.g. if user can comment, but can't assign tickets.
2019-01-06 21:37:23 -05:00
Novalinium 0ae006b82b Garnish HTML with IDs for easier user stylesheets and programmatic access
Signed-off-by: Novalinium <nova@noblejury.com>
2019-01-05 12:52:31 -05:00
Drew DeVault a2633cd3a7 Explicitly order ticket events for display 2019-01-03 17:56:54 -05:00