Commit graph

425 commits

Author SHA1 Message Date
Jyri-Petteri Paloposki
dc0ca7239a
Merge branch 'master' into bug/1153_stats 2019-05-22 01:48:37 +03:00
Jyri-Petteri Paloposki
644cf0d9e7 Fix the syntax 2019-05-21 22:33:21 +03:00
Jyri-Petteri Paloposki
7fc1f1bf9f
Update app/models/todos/undone_todos_query.rb
Co-Authored-By: Matt Rogers <mattr-@github.com>
2019-05-21 22:28:37 +03:00
Jyri-Petteri Paloposki
d784b1a5eb #1929: Fix the actions query breaking when querying actions with a non-existent tag 2019-05-21 15:17:50 +03:00
Jyri-Petteri Paloposki
80aad1b4f2 #1153: Remove unnecessary type change and test for stats chart templates and endpoints which were removed 2019-05-20 01:12:25 +03:00
Jyri-Petteri Paloposki
b7320a1de8 #1153: Perhaps the final deletion of the old Flash charts code 2019-05-19 18:40:23 +03:00
Jyri-Petteri Paloposki
b040dfce51 #1153: Final checks against the old code, fixed the last mistakes 2019-05-19 17:39:38 +03:00
Jyri-Petteri Paloposki
f9370a9a4a #1153: Fix whitespace issues caused by Vim misconfiguration 2019-05-19 16:51:26 +03:00
Jyri-Petteri Paloposki
0b326e17d8 #1153: Use translations properly, add missing labels, fix bugs and add links to charts 2019-05-19 16:40:00 +03:00
Jyri-Petteri Paloposki
f873a93eb3 #1153: Convert rest of the stats to use ChartJS 2019-05-19 13:04:33 +03:00
Jyri-Petteri Paloposki
dec82fd26c #1153: Change to using Chart.js with a basic RoR library instead of Chartkick because Chartkick doesn't support combo charts. 2019-05-17 22:49:21 +03:00
Jyri-Petteri Paloposki
c9cae9421a #1153: Few of the graphs converted to use Chartkick 2019-05-17 22:49:21 +03:00
Matt Rogers
19168f262d
Merge pull request #2211 from TracksApp/prefer-find-by-over-detect
Prefer find_by over detect
2019-05-06 08:43:51 -05:00
Matt Rogers
11b9081064
Use !exists? instead of empty?
`exists?` issues a better SQL query than `empty?`
2019-05-04 15:16:36 -05:00
Matt Rogers
596096b8d5
Prefer find_by over detect
Uses a better SQL query to pull a single object vs. pulling a full set
and then iterating over it.
2019-05-04 14:51:22 -05:00
Matt Rogers
63ac90ebb2
Convert to using symbols everywhere 2019-04-11 11:28:43 -05:00
Matt Rogers
fc17a03bc0
Add tests for the new object and fix a bug
Each of the individual query chunks has their own test, in addition to a
test for the full combination of parameters that could influence a
query.

There is also a bugfix for the tag query in here, since I want, as much
as possible, to have passing tests on every commit.
2019-04-11 09:53:53 -05:00
Matt Rogers
ec1a4d78ba
Temporarily add the sanitize helper
This is so we can keep the tests passing by fixing a NoMethodError when
attempting to run both the new query object and the existing code at the
same time.
2019-04-07 20:01:22 -05:00
Matt Rogers
9de975f8eb
Extract a query object for not done todos 2019-04-07 19:59:01 -05:00
Matt Rogers
f2647e3f94
Remove deprecations printed out in the test suite 2018-11-20 19:57:02 -06:00
Matt Rogers
32d267d6cd
Remove private variable usage from models
It seems that `@new_record_before_save` as an instance variable has been
present since around 2007 and it wasn't until Rails 5.1 that things were
changed in such a way to make this inaccessible now.
2018-11-12 13:23:30 -06:00
Matt Rogers
0e21d64890
Convert to ApplicationRecord
Rails 5 requires the use of this superclass for all database backed
model objects now.
2018-11-03 15:57:14 -05:00
Matt Rogers
6e70fcbe5e
Update how the sorting is done in the User model
Use the `sort_by` method to do the sorting rather than converting to an
array and then calling `sort`

Co-Authored-By: Dan Rice <dnrce@users.noreply.github.com>
2018-10-27 11:27:22 -05:00
Matt Rogers
500892e1a4 Fix the top 10 longest running projects list
Sorting by running time without a reverse takes the shortest running
projects.
2017-06-13 17:12:15 -05:00
Carsten Otto
ed3bca22a4 Remove 'project_hidden' state
Compute it using project/context state

Notable change:
todo.hidden? now also returns true if the todo is completed
2016-04-16 09:27:33 +02:00
Jan-Yves Ruzicka
ccf13418f4 Extract rendering to helper method. Shift filename sanitization to controller. 2016-02-02 11:08:12 +00:00
Matt Rogers
42ab5e3000 Merge pull request #1951 from C-Otto/show_from_midnight
when recurring todos always use midnight for "show from"
2016-01-21 16:13:30 -06:00
Carsten Otto
cd09cce7a4 when recurring todos always use midnight for "show from"
fixes #1940
2015-12-13 15:44:40 +01:00
Matt Rogers
3468d1ec13 Merge branch '2.3_branch' 2015-12-08 20:14:33 -06:00
Nascher
dd6698b8a1 Update the maximum password length 2015-08-29 23:58:02 +00:00
Nascher
4632208699 Increase the maximum password length 2015-08-29 18:36:12 +00:00
Reinier Balt
0602634ae3 Fasterer: Use #cover? instead of #include? on ranges 2015-08-19 15:42:14 +02:00
Reinier Balt
bb006f98c1 Using tr is faster than gsub
Using tr is faster than gsub when replacing a single character in
a string with another single character.

Also freeze constant strings
2015-08-19 15:24:35 +02:00
Reinier Balt
d3aa73f783 first select than sort
sorting on a smaller collection is faster
2015-08-19 15:21:11 +02:00
Reinier Balt
405ad5a79f Fasterer: Enumerable#sort is slower
Enumerable#sort is slower than Enumerable#sort_by
2015-08-19 15:19:47 +02:00
Reinier Balt
ddd9c07d3b Fasterer: Use &:symbol is faster
Calling argumentless methods within blocks is slower than using
symbol to proc.
2015-08-19 14:48:31 +02:00
Carsten Otto
e0143cf435 move actual activation to model
fixes #1881
2015-08-09 13:47:17 +02:00
Matt Rogers
a9023960fc Merge pull request #1848 from C-Otto/tracks-1847
Fix description of monthly recurring tests
2015-08-07 20:29:40 -04:00
Matt Rogers
f393afb69f Merge branch '2.3_branch'
This brings the master branch up to date with the 2.3 release branch
2015-08-07 20:27:14 -04:00
Matt Rogers
efbf881742 Merge pull request #1872 from C-Otto/create-reviewed-2.3
(2.3) create projects as reviewed at creation time
2015-08-07 19:59:57 -04:00
Matt Rogers
1c0a70df75 Merge pull request #1903 from lrbalt/fix-test-errors
Fix failing tests for non-UTC timezones
2015-08-07 19:50:58 -04:00
Reinier Balt
5cabeca155 enhance MessageGateway to save email as attachment 2015-08-05 16:05:56 +02:00
Reinier Balt
2bd68fecb7 Create attachment model and hook it up to todo
An attachment has write permissions on group so that managing
attachments work from different users in same group, i.e. user apache
and user mail.
2015-08-05 16:05:19 +02:00
Reinier Balt
e58379e81f This fixes failing tests when the timezone is different than utc
There were several problems:
* Time.now returns the systems time, not the users time
* fixtures do not translate dates from timezone to utc, but stores the
  date verbatim
* calling a controller will set the timezone to the preference of the
  current_user. So it could be changed while you do not realize this. I
  fixed the failing test, but problems could be elsewhere
2015-08-05 11:50:33 +02:00
Carsten Otto
67ced62096 Projects with completed actions may be blocked
Currently, a project cannot be blocked if at least one completed
action exists. This was introduced in
acab98d4c7,
and I assume this change was not intended
2015-06-16 20:44:26 -04:00
Carsten Otto
6014ce7a6f create projects as reviewed at creation time
Fixes #1788
2015-05-22 23:12:45 +02:00
Carsten Otto
72f7513650 fix #1847 2015-05-09 19:21:01 +02:00
Carsten Otto
cc88d24d79 Projects with completed actions may be blocked
Currently, a project cannot be blocked if at least one completed
action exists. This was introduced in
acab98d4c7,
and I assume this change was not intended
2015-04-15 20:46:53 +02:00
Dan Rice
1dbef179a7 Revert breaking commits
This reverts the following commits:
319d4b00cd
403cc1015e
37485013a0
d08ffb3806
2015-04-14 23:28:18 -04:00
Dan Rice
556c68c2e6 Revert breaking commits
This reverts the following commits:
c129b8a06f
c7c923a317
006c135a64
2015-04-14 22:26:07 -04:00