39 Commits

Author SHA1 Message Date
Oliver Günther 4cc9faef4f Consistently use OpenProject::SqlSanitization instead of forwarding to sanitize_sql_array 2026-05-27 10:08:16 +02:00
Oliver Günther 4724150e3d Avoid quote_string in favor of bindings where possible 2026-05-27 10:08:16 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
ulferts 3b2121f733 Revert "Merge remote-tracking branch 'origin/release/13.4' into dev"
This reverts commit 40b2bbeb09, reversing
changes made to b4c6cb17cc.
2024-03-21 11:31:17 +01:00
Ivan Kuchin 7787e457a3 Revert "Merge branch 'dev' into release/13.4"
This reverts commit a901541269, reversing
changes made to e573ca00b7.
2024-03-20 20:19:08 +01:00
Ivan Kuchin 9e4934cd0a change quotes using rubocop --only Style/StringLiterals,Style/QuotedSymbols -a 2024-03-20 18:05:22 +01:00
Christophe Bliard c795874f7f Update copyright year for 2024
command used: `rg -l 'Copyright \(C\) 2012-202\d the OpenProject' | xargs -n 100 sed -i -r 's/Copyright \(C\) 2012-202. the OpenProject/Copyright (C) 2012-2024 the OpenProject/'`
2024-01-02 16:23:54 +01:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
Christophe Bliard a33524ef6d remove ruby magic comment for utf-8
ruby interprets source encoding as utf-8 since 2.0.0, making magic comment redundant and useless
2022-03-10 19:36:58 +01:00
Christophe Bliard bc8d423ec2 update copyright information for 2022 2022-03-01 17:05:59 +01:00
Oliver Günther ccfa29c728 Move license and copyright docs to root, fix names and references 2021-09-02 21:50:46 +02:00
ulferts 1bdd2ab9ae safe automatic fixes by rubocop (#8994) 2021-02-11 16:02:18 +01:00
ulferts 6140f4c7e9 update copyright to 2021 (#8925)
Updates the copyright to 2021 for all files that have a copyright. Files in our source code without the copyright header still do not receive one automatically. Additionally, backlisted files are also excluded.

Previously the copyright of chiliproject which references redmine stated a copyright of redmine up to and including 2017 which is not true for the code we have in here. Because of that I changed that to 2013
2021-01-13 17:47:45 +01:00
ulferts 6a5c22d73d remove unused nested_set patch 2020-09-01 10:59:44 +02:00
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
Oliver Günther 6ef4211e77 Bump copyright to 2018 (#6171)
[ci skip]
2018-02-12 08:51:12 +01:00
Jens Ulferts 6fdd122534 merge wp tree and relations into typed_dag
Instead of having the tree/hierarchy information for work packages and
the relations between the work packages separated into two tables all
the information is now stored in the relations table.

To support this, the typed_dag plugin is used.

Notable changes:
* relations_to and relations_from are swapped. relations_to has all
relations that point to another work package (from_id = work_package.id)
and relations_from contains all relations that lead to the work package
from another one (to_id = work_package.id). This change is merely in the
code. The db information is left untouched.
* For follows/precedes to_id and from_id are swapped in the db. Because
of that, "follows" is now the canonical name instead of "precedes". This is
done so that hierarchy relations and follows relations point into the
same direction which allows to easily detect cyclic relationships that
would lead to infinit scheduling.
* the columns `root_id`, `lft`, `rgt` do no longer exist in the wp
table.
* the column `relation_type` does no longer exist in the relations
table.
* For every type of relation a column (integer) does now exist in the
relations table (e.g. hierarchy, block, follow)
* Separate associations exist for every type of relation into two
directions. E.g. Work packages following the current one can be accessed
via `work_package.precedes`
2017-10-18 10:41:31 +02:00
Oliver Günther 7cf11bb689 Update copyright notice 2017-01-10 15:11:43 +01:00
Alex Coles b2790b8db1 Migrate deprecated .update_all with conditions
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-06-30 22:01:03 +02:00
Alex Coles a31559cc01 Migrate nested_set scopes to use lambda/block
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-06-30 12:12:55 +02:00
Alex Coles a6c54cb25f Migrate AR finder/query methods in lib code
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-06-30 12:12:53 +02:00
Alex Coles a6212fb304 Fix syntax (w/Rubocop) in lib code
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-06-30 12:08:31 +02:00
Alex Coles 57618b25ec Replace dynamic finder usages with #find_by, etc.
This patch replaces all dynamic finders, for the sake of consistency,
although only some methods are deprecated. See:
https://github.com/rails/activerecord-deprecated_finders#active-record-deprecated-finders

* Revert some `User#find_by_login` usages in cuke steps accidentally
  removed in 74228b59.

User Story # 20325

Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-06-30 11:50:26 +02:00
Alex Coles e0191e759c Update year in copyright header to 2015
[ci skip]
2015-01-01 00:02:57 +00:00
Alex Coles 45297523c2 Fix syntax (w/Rubocop) in lib code
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2014-11-03 23:49:01 +01:00
Alex Coles e7400af52a Use 1.9+ Hash syntax in lib code
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2014-11-03 22:15:13 +01:00
Alex Coles 31a6a2597f Fix typos, spelling in lib-folder comments
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2014-04-04 23:19:39 +02:00
Johannes Wollert 8b096975fe updates copyright headers
updates more copyright

more copyright headers
2014-02-27 16:39:51 +01:00
Sebastian Schuster 70bb322e23 Fixed a bug with non-functional validation for work package parents 2013-12-12 17:36:16 +01:00
Johannes Wollert 7a978c59e9 uses correct error messages for nested set work package validations 2013-12-11 16:06:49 +01:00
Hagen Schink 6537d8aaaa Renames settings 2013-09-20 14:27:06 +02:00
Philipp Tessenow a1e67dd460 new copyright header #1903 2013-09-16 17:59:31 +02:00
Jens Ulferts b9590aff9a patches nested_set to add tree rebuilding methods that are not using
save

The original nested_set implementation uses save on each node (issue,
project). With the callbacks defined on issues, this can lead to stale
object errors when an issues has been loaded by the rebuilding method
but changed by a callback.

The rebuild_silently! method can also take root nodes as their
parameter. With such provided the method will only fix their trees.

This is build upon by the selectively_rebuild_silently! method which
first looks for invalid nodes, determines their root node and then calls
rebuild_silently! with those root nodes. This should speed up rebuilding
on large trees.

Additionally, methods where added as a byproduct to retreive nodes
who's tree attributes are invalid.
2013-07-31 09:55:01 +02:00
Jens Ulferts ac209eb276 adds documentation 2013-07-31 09:49:32 +02:00
Jens Ulferts 37ff41081f removes parent_issue_id from scoped nested_set as it is no longer necessary - yeah 2013-07-31 09:49:31 +02:00
Jens Ulferts c0b57509e4 alternate implementation of nested set with root id 2013-07-31 09:49:30 +02:00
Jens Ulferts 5d3b70928c moves after save hooks to work_package 2013-07-31 09:49:30 +02:00
Jens Ulferts b03a412cef internal restructurings of nested_set patch 2013-07-31 08:14:41 +02:00
Jens Ulferts 247436ca38 moves scoped nested set into own module, applies to WorkPackage 2013-07-31 08:14:41 +02:00