Commit graph

58 commits

Author SHA1 Message Date
kolaente
e4de700a10
Simplify updating task reminders 2020-12-16 13:05:58 +01:00
kolaente
316ac0558b
Fix task updated timestamp not being updated in the response after updating a task 2020-10-25 12:59:28 +01:00
konrad
699d3d6060 Add Golangci Lint (#676)
Increase golangci timeout

Fix installing golangci-lint in ci

Remove mage targets replaced by golangci

Run golint in ci

Add goheader linter

Enable & fix more linters

Fix lint issues

Add mage target to automagically fix issues found by golangci

golangci-lint run --fix

Add golangci config

Add golangci mage target

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/676
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
2020-10-11 20:10:03 +00:00
konrad
0fb2edf051 Saved filters (#655)
Fix updating saved filters

Fix filter not loadable because of missing param declaration

Add fancy special cases for postgres exists in db

Add special case for postgrs json

Add read one test

Add rights tests

Fix lint

Fixed getting a single saved filter from db

Add tests for the usual crud methods

Add test stubs and TODOs

Add test for converting saved filter ids to list ids and vice versa

Add test fixture for saved filters and fix existing tests

Fix exposed json variables of filters

Fix creating saved filters table for tests

Add getting saved filters as pseudo namespace

Cleanup

Refactor getting all namespaces to use a map for easier handling of pseudo namespaces

Add custom erros for saved filters

Swagger docs

Fix lint

Add routes for saved filters

Add alias for mage build

Add method to get a saved filter from the lists endpoint

Add getting tasks from a saved filter

Add create, update, delete, read one methods

Add rights methods for saved filters

Fix docs minLength

Add saved filters column

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/655
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
2020-09-26 21:02:17 +00:00
konrad
e5559137dd Favorite tasks (#653)
Fixed namespace tests

Add test for favorite tasks

Fix favorite tasks not being updated

Fix integration tests

Fix lint

Return a pseudo namespace and list for favorites

Make sure users can only see their favorites

Add condition show tasks from the favorites list

Regenerate swagger docs

Add favorite field to task

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/653
2020-09-05 20:16:02 +00:00
kolaente
ecf09e17a8
Only check if a bucket limit is exceeded when moving a task between buckets 2020-09-04 22:01:33 +02:00
konrad
14d706c91e Kanban bucket limits (#652)
Fix integration tests

Generate swagger docs

Add test for moving a task between buckets

Add check for bucket limit when updating a task

Add fixture to ensure a bucket with a high limit will never exceed the limit

Refactor bucket limit check into seperate function

Add test for creating and fix

Fix unexported field

Add error in case a task was added to a bucket which has its limit already exceeded

Add migration to add new task field

Add limit field to buckets

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/652
2020-09-04 14:37:56 +00:00
konrad
dfb7730b63 More avatar providers (#622)
Don't fail if the last avatar file does not exist when deleting it

Fix lint

Remove old global avatar setting and update docs

Generate docs

Invalidate the avatar cache when uploading a new one

Add debug logs

Add caching for upload avatars

Add cache locks

Fix encoding

Resize the uploaded image to a max of 1024 pixels

Remove the old uploaded avatar if one already exists

Add mimetype check for images

Set avatar provider to upload when uploading an avatar

Add upload avatar provider

Make font size smaller to let the initials still look good in smaller sizes

Add debug log

Add cache and resizing of initials avatars

Make font size depend on avatar size

Add drawing initials avatar

Add initials provider

Make the initials avatar provider the default

Add routes

Add user avatar settings handler methods

Add user avatar provider field

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/622
2020-08-02 17:16:58 +00:00
konrad
e4539ef232 Use db sessions for task-related things (#621)
Use db sessions for task-related things

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/621
2020-08-01 16:54:38 +00:00
kolaente
f57b7e989f
Fix updating the index when moving a task 2020-07-01 16:54:18 +02:00
kolaente
556ccd68c1
Set the list identifier when creating a new task 2020-07-01 11:17:18 +02:00
konrad
1181039249 Duplicate Lists (#603)
Fix buckets not being duplicated correctly

Fix list id param not working

Add api endpoint

Add swagger docs

Add comment about test

Make duplicating actually work

Add copying link shares

Add copying list backgrounds

Add copying task relations

Add copying task comments

Add copying assignees

Add copying task task label relations

Add copying task attachments

Add duplicating tasks

Add basic struct and methods

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/603
2020-06-30 20:53:14 +00:00
kolaente
3b2289c8fa
Fix swagger docs 2020-06-28 16:25:46 +02:00
konrad
08205008e7 Migrate all timestamps to real iso dates (#594)
Fix query param name

Add option to include null results when filtering

Always set db time to gmt

Fix null filter

Fix timezone setting for todoist parsing

Fix timezone setting for wunderlist parsing

Fix import

Fix caldav reminder parsing

Use timezone from config

Add error and test for invalid filter values

Fix integration tests

Remove task collection date hack

Fix task filter

Fix lint

Fix tests and fixtures for date timezone stuff

Properly set timezone

Change fixtures time zone to gmt

Set db timezone

Set created and updated timestamps for all fixtures

Fix lint

Fix test fixtures

Fix misspell

Fix test fixtures

Partially fix tests

Remove timeutil package

Remove adding _unix suffix hack

Remove _unix suffix

Move all timeutil.TimeStamp to time.Time

Remove all Unix suffixes in field names

Add better error messages when running migrations

Make sure to not migrate 0 unix timestamps to 1970 iso dates

Add migration script for sqlite

Add converting sqlite values

Convert 0 unix timestamps to null in postgres

Convert 0 to null in timestamps

Automatically rename _unix suffix

Add all tables and columns for migration

Fix sql migration query for mysql

Fail with an error if trying to use an unsupported dbms

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/594
2020-06-27 17:04:01 +00:00
kolaente
525a547500
Remove min length for labels, lists, namespaces, tasks and teams 2020-06-17 18:52:23 +02:00
konrad
47d7e713af Repeat tasks after completion (#587)
Fix integration tests

Add updating start and end date from current date

Add updating reminders from current date

Add updating reminders from current date

Add updating due date from current date

Add updating flag

Add tests

Add field to repeat a task after current date

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/587
2020-06-14 11:04:38 +00:00
konrad
ab1d58959f Ensure task dates are in the future if a task has a repeating interval (#586)
Ensure task dates are in the future if a task has a repeating interval

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/586
2020-06-13 21:32:31 +00:00
kolaente
98ef052967
Don't return all tasks when a user has no lists 2020-05-19 17:22:10 +02:00
konrad
fe43173b6c Ensure consistent naming of title fields (#528)
Remove task text and namespace name in migration

Fix lint

Add migration for namespace title

Fix renaming namespace name to title

Rename namespace name field to title

Drop text column at the end of the migration

Add migration for task text to title

Rename task text to title

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/528
2020-05-16 10:17:44 +00:00
konrad
8758fb6ac5 Fix case-insensitive task search for postgresql (#524)
"Fix" gocyclo

Fix case-insensitive task search for postgresql

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/524
2020-05-15 14:12:20 +00:00
kolaente
4137d4aed2
Fix creating new things with a link share auth 2020-05-12 15:51:48 +02:00
konrad
8ac158cdb4 Task Filter Fixes (#495)
Fix gocyclo

Fix misspell

Error codes docs

Filter fixes

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/495
2020-05-09 15:48:56 +00:00
kolaente
a97ce76f1f
Fix bucket ID being reset with no need to do so 2020-05-03 22:25:48 +02:00
kolaente
83cf6e191c
Fix not moving its bucket when moving a task between lists 2020-05-03 21:33:59 +02:00
kolaente
f0ac6e89be
Remove setting task bucket to 0 2020-05-03 21:24:28 +02:00
kolaente
fa28ddc2f7
Fix pagination count for task collection 2020-04-27 19:28:19 +02:00
konrad
231dc3913f Add real buckets for tasks which don't have one (#446)
Add docs for error code

Add moving new tasks into the default bucket when none was provided

Add moving tasks in default bucket when deleting one

Fix tests again

Add test for removing a bucket

Fix tests

Prevent removing the last bucket

Remove the empty pseudo bucket

Add migration to create a new bucket for each list (and put all tasks in it

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/446
2020-04-25 20:32:02 +00:00
konrad
e433289832 Task Position (#412)
Fix misspell

Fix sorting tasks with null values

Fix sorting by priority for postgres

Merge branch 'master' into feature/position

Add community link

Update golang.org/x/crypto commit hash to 44a6062 (#429)

Update golang.org/x/crypto commit hash to 44a6062

Reviewed-on: https://kolaente.dev/vikunja/api/pulls/429

Update module lib/pq to v1.4.0 (#428)

Update module lib/pq to v1.4.0

Reviewed-on: https://kolaente.dev/vikunja/api/pulls/428

Fix updating position

Add ordering tasks in buckets by position

Make task sort by string

Merge branch 'master' into feature/position

Update golang.org/x/crypto commit hash to 3c4aac8 (#419)

Update golang.org/x/crypto commit hash to 3c4aac8

Reviewed-on: https://kolaente.dev/vikunja/api/pulls/419

Merge branch 'master' into feature/position

Fix moving tasks back into the empty (ID: 0) bucket

Add adding a default position when creating new tasks

Update golang.org/x/crypto commit hash to a76a400 (#411)

Update golang.org/x/crypto commit hash to a76a400

Reviewed-on: https://kolaente.dev/vikunja/api/pulls/411

Remove unused code

Fix tests

Add migration for position attribute

Add position attribute

Co-authored-by: kolaente <k@knt.li>
Co-authored-by: renovate <renovatebot@kolaente.de>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/412
2020-04-24 15:23:03 +00:00
kolaente
68ab6d2e75
Fix moving tasks back into the empty (ID: 0) bucket 2020-04-20 23:08:38 +02:00
kolaente
59037e4eee
Fix moving tasks in buckets 2020-04-20 18:08:20 +02:00
konrad
ecdecdd94e Kanban (#393)
Fix tests

Add error docs

Add swagger docs for bucket endpoints

Add integration tests

Fix tests

Fix err shadow

Make sure a bucket and a task belong to the same list when adding or updating a task

Add tests

Add getting users of a bucket

Fix log level when testing

Fix lint

Add migration for buckets

Cleanup/Comments/Reorganization

Add Kanban bucket handling

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/393
2020-04-19 07:27:28 +00:00
konrad
28ec44c91f Add moving tasks between lists (#389)
Fix misspell

Add moving tasks between lists

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/389
2020-04-18 12:35:37 +00:00
kolaente
fb8ac92abf
Change all json fields to snake_case 2020-04-12 22:48:46 +02:00
konrad
d28f005552 Update xorm to v1 (#323)
Fix limit for databases other than sqlite

go mod tidy && go mod vendor

Remove unneeded break statements

Make everything work with the new xorm version

Fix xorm logging

Fix lint

Fix redis init

Fix using id field

Fix database init for testing

Change default database log level

Add xorm logger

Use const for postgres

go mod tidy

Merge branch 'master' into update/xorm

# Conflicts:
#	go.mod
#	go.sum
#	vendor/modules.txt

go mod vendor

Fix loading fixtures for postgres

Go mod vendor1

Update xorm to version 1

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/323
2020-04-12 17:29:24 +00:00
konrad
0ba121fdfb Task filters (#243)
Fix not returning errors

Fix integration tests

Add more tests

Make task filtering actually work

Change tests

Fix using filter conditions

Fix test

Remove unused fields

Fix static check

Remove start and end date fields on task collection

Fix misspell

add filter logic when getting tasks

Add parsing filter query parameters into task filters

Start adding support for filters

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/243
2020-04-11 14:20:33 +00:00
konrad
88bf8f3df0 Fix updating dates when marking a task as done (#145)
Fix lint

Fix reminders not being updated

Fix updating dates when marking a task as done

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/145
2020-02-26 21:09:45 +00:00
konrad
db2d868eed Return iso dates for everything date related from the api (#130)
Remove traces of unix timestamp

Revert renaming reminder table column

Fix staticcheck

Remove unused table call

Add migration for renaming reminders table

Fix issues with using TimeStamp

Fix lint

Updated all created / updated fields to use TimeStamps

Add comments

Convert all created / updated fields to datetime

Add time util package

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/130
2020-02-08 12:48:49 +00:00
kolaente
1f99238019
Update copyright header 2020-02-07 17:27:45 +01:00
konrad
7e9446ea07 Refactor User and DB handling (#123)
fix copyright date

Add more user tests

More user tests

More user tests

Start refactoring user tests

Docs

Fix lint

Fix db fixtures init in tests

Fix models test

Fix loading fixtures

Fix ineffasign

Fix lint

Fix integration tests

Fix init of test engine creation

Fix user related tests

Better handling of creating test enging

Moved all fixtures to db package

Moved all fixtures to db package

Moved user related stuff to seperate package

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/123
2020-01-26 17:08:06 +00:00
konrad
a0c5e4e985 Update copyright year (#118) 2020-01-09 17:33:22 +00:00
konrad
7cdc997191 Fix new tasks not getting a new task index (#116) 2019-12-08 15:10:34 +00:00
konrad
720df3cbed Add task identifier (#115) 2019-12-07 22:28:45 +00:00
konrad
d8399e374c Sort Order for tasks (#110) 2019-12-07 14:30:51 +00:00
shilch
e890001ee1 Consistent copyright text in file headers (#112) 2019-12-04 19:39:56 +00:00
konrad
7e4deab8f7 Task collection improvements (#109) 2019-12-01 13:38:11 +00:00
konrad
d96831fe3a Endpoint to get tasks on a list (#108) 2019-11-29 22:59:20 +00:00
kolaente
37efd5cb49
Fixed removing reminders 2019-11-24 16:13:16 +01:00
kolaente
c203d73b33
Fixed a bug where adding assignees or reminders via an update would re-create them and not respect already inserted ones, leaving a lot of garbage 2019-11-03 23:08:26 +01:00
konrad
9be5ab248c Add endpoint to get a single task (#106) 2019-11-02 20:33:18 +00:00
konrad
8948a5f219 Improve pagination (#105) 2019-10-23 21:11:40 +00:00