35 Commits

Author SHA1 Message Date
Klaus Zanders c2bc836ea1 Consistently load work packages via visible scope 2026-02-09 15:07:49 +01:00
Mir Bhatia ef5150649a Add checks for update and delete actions 2025-09-16 17:06:20 +02:00
Jan Sandbrink f824b479e8 Merge DialogStreamHelper into ComponentStream
The former depended 100% on the latter anyways and there
was no clear separation of concerns between the two. For
example ComponentStream had methods to close a dialog.
Thus it made sense to merge the two.
2025-06-20 08:14:49 +02:00
Christophe Bliard cd7403932b [63521] Do nothing if relation to delete does not exist anymore
https://community.openproject.org/wp/63521

No need to delete something that does not exist anymore. This can happen
when the same relation is deleted in two different browser tabs.
2025-04-17 12:20:45 +02:00
Henriette Darge b3a7fc55cd Correct permitted params depending on the relation direction and add a test case 2025-02-13 12:53:44 +01:00
Henriette Darge 7a243a54cf Show error messages for both from_id and to_id fields in the relations dialog 2025-02-13 12:53:27 +01:00
Henriette Darge 153fff72e7 Show a form error when there is no WP selected before adding a relation via modal 2025-02-13 12:53:05 +01:00
Behrokh Satarnejad 280f02b5cb show errors in relation updating 2025-02-07 08:13:13 +01:00
Behrokh Satarnejad cb25df9220 show errors in relations creating 2025-02-07 08:13:13 +01:00
Christophe Bliard b0ee80ccd0 refactor: extract method respond_with_relations_tab_update 2025-01-15 16:03:18 +01:00
Christophe Bliard 8937978432 refactor: introduce relations mediator
The mediator is responsible for providing the relations and children
from a work package for the relations tab. This moves the responsibility
of relations and children visibility in one central place.
2025-01-15 16:03:11 +01:00
ulferts 6486a34c47 improve expressiveness of scrolling to functionality 2025-01-10 08:28:44 +01:00
Christophe Bliard de565583b2 Merge branch 'release/15.1' into release/15.2 2025-01-09 17:16:50 +01:00
Christophe Bliard 4fedb5bee8 [60479] Only show relations the user has permission to see 2025-01-09 16:16:28 +01:00
Behrokh Satarnejad d00aea4eec change the attr name and set the selector on the row 2024-12-10 17:25:51 +01:00
Behrokh Satarnejad c15aef13b9 pass target relation for scrolling in relation and children controllers while creating a new relation or child 2024-12-05 14:12:56 +01:00
Henriette Darge b3f915795a Show and edit the Lag for follows/precedes relationships 2024-11-29 10:47:09 +01:00
Aaron Contreras 0f86ad73e4 Fix safari layouting issuse
ActionMenu button would flow off the screen as the flex basis was
not appropriate
2024-11-13 07:50:09 -05:00
Aaron Contreras bdad2afe8c Split Child vs Relation and Create vs Edit 2024-11-13 06:47:46 -05:00
Aaron Contreras 2d3d566720 Allow creating new relations from relations tab
* Create `new` controller action and tests to render modal with form.

* Render new relation form with tests.

* Plug in create service and form fields required for creating
  a relation with tests.

* Make description settable with tests.
2024-11-13 06:47:46 -05:00
Aaron Contreras 38fa140d3f Add ability to edit relations
* Render a modal with hotwire

* Set permissions

* Build form modal component

* Render toggles to trigger form field visibilities

* Add feature specs

* Handle controller and service to take in the
  added description if provided.
2024-11-13 06:47:45 -05:00
Aaron Contreras f698bb9373 Add ability to delete relations from within the tab 2024-11-13 06:47:45 -05:00
Oliver Günther b64ef39986 Remove relations 2015-11-17 15:24:20 +01:00
Alex Coles 0ad3cfb4b2 Prefer do…end for controller respond_to blocks
`rubocop -a` does not currently normalise formatting consistently
(see ec1bb39f).

Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-07-07 19:44:22 +02:00
Alex Coles ec1bb39f9b Fix syntax (w/Rubocop) in (Rails) controllers
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-06-30 12:08:27 +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 bb0e6e6aa5 Fix syntax (w/Rubocop) in (Rails) controllers
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2014-11-03 22:15:11 +01:00
Alex Coles 336446c59d Use 1.9+ Hash syntax in (Rails) controllers
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2014-11-03 22:15:11 +01:00
Johannes Wollert 8b096975fe updates copyright headers
updates more copyright

more copyright headers
2014-02-27 16:39:51 +01:00
Hagen Schink 9931ab2e31 Renames issue_to 2013-09-19 16:26:31 +02:00
Philipp Tessenow a1e67dd460 new copyright header #1903 2013-09-16 17:59:31 +02:00
Jens Ulferts ba2dc0b901 fixes relations for work_packages 2013-07-09 18:22:02 +02:00
Hagen Schink f19c3f7617 Use work package path 2013-07-09 14:11:28 +02:00
Hagen Schink 3d6d8bd192 Show work package relations 2013-07-09 14:11:26 +02:00