File tree 5 files changed +29
-9
lines changed
components/work_package_relations_tab
frontend/src/app/core/routing
spec/features/work_packages
5 files changed +29
-9
lines changed Original file line number Diff line number Diff line change 504
504
concurrent-ruby (~> 1.0 )
505
505
dry-core (~> 1.1 )
506
506
zeitwerk (~> 2.6 )
507
- dry-monads (1.8.2 )
507
+ dry-monads (1.8.3 )
508
508
concurrent-ruby (~> 1.0 )
509
509
dry-core (~> 1.1 )
510
510
zeitwerk (~> 2.6 )
@@ -1593,7 +1593,7 @@ CHECKSUMS
1593
1593
dry-inflector (1.2.0) sha256=22f5d0b50fd57074ae57e2ca17e3b300e57564c218269dcf82ff3e42d3f38f2e
1594
1594
dry-initializer (3.2.0) sha256=37d59798f912dc0a1efe14a4db4a9306989007b302dcd5f25d0a2a20c166c4e3
1595
1595
dry-logic (1.6.0) sha256=da6fedbc0f90fc41f9b0cc7e6f05f5d529d1efaef6c8dcc8e0733f685745cea2
1596
- dry-monads (1.8.2 ) sha256=662e0b4515bc41048e0e2c033db86327839649a53bff383489096e47a71f22b0
1596
+ dry-monads (1.8.3 ) sha256=5fbc06ae4ff76ae081922a902be998673703304d10b46b08931696f2c8decc06
1597
1597
dry-schema (1.14.1) sha256=2fcd7539a7099cacae6a22f6a3a2c1846fe5afeb1c841cde432c89c6cb9b9ff1
1598
1598
dry-types (1.8.2) sha256=c84e9ada69419c727c3b12e191e0ed7d2c6d58d040d55e79ea16e0ebf8b3ec0f
1599
1599
dry-validation (1.11.1) sha256=70900bb5a2d911c8aab566d3e360c6bff389b8bf92ea8e04885ce51c41ff8085
Original file line number Diff line number Diff line change 2
2
// It can't be nested inside the BEM model as it's placed as a #top-layer element.
3
3
#new-relation-action-menu-list ,
4
4
#new-child-action-menu-list
5
- max-height : 450 px
5
+ max-height : 470 px
6
6
max-width : 280px
Original file line number Diff line number Diff line change @@ -47,10 +47,15 @@ class WorkPackageCustomField < CustomField
47
47
}
48
48
49
49
scope :visible_by_user , -> ( user ) {
50
- where ( projects : { id : Project . visible ( user ) } )
51
- . where ( types : { id : Type . enabled_in ( Project . visible ( user ) ) } )
52
- . or ( where ( is_for_all : true ) . references ( :projects , :types ) )
53
- . includes ( :projects , :types )
50
+ # Prefer a subquery to a join to avoid the database query returning
51
+ # the cross product of projects, types and custom fields.
52
+ where ( id :
53
+ unscoped
54
+ . where ( projects : { id : Project . visible ( user ) } )
55
+ . where ( types : { id : Type . enabled_in ( Project . visible ( user ) ) } )
56
+ . or ( unscoped . where ( is_for_all : true ) )
57
+ . includes ( :projects , :types )
58
+ . select ( :id ) )
54
59
}
55
60
56
61
scope :usable_as_custom_action , -> {
Original file line number Diff line number Diff line change @@ -182,8 +182,10 @@ export function initializeUiRouterListeners(injector:Injector) {
182
182
openprojectBaseApp = document . querySelector ( appBaseSelector ) ;
183
183
uiRouter . urlService . sync ( ) ;
184
184
185
- // Re-apply the body classes
186
- bodyClass ( _ . get ( uiRouter . globals . current , 'data.bodyClasses' ) , 'add' ) ;
185
+ // Re-apply the body classes if the turbo load event is on the same page (e.g. when creating a child from the relations tab)
186
+ if ( stateService . href ( uiRouter . globals . current ) === window . location . pathname + window . location . search ) {
187
+ bodyClass ( _ . get ( uiRouter . globals . current , 'data.bodyClasses' ) , 'add' ) ;
188
+ }
187
189
} ) ;
188
190
189
191
// Uncomment to trace route changes
Original file line number Diff line number Diff line change 262
262
expect ( page ) . to have_css "li" , text : "The requested resource could not be found"
263
263
end
264
264
end
265
+
266
+ # Introduced by regression #60629
267
+ it "can navigate correctly to non-angular pages (regression #61790)" do
268
+ global_work_packages = Pages ::WorkPackagesTable . new
269
+ global_work_packages . visit!
270
+
271
+ # Navigate to the administration
272
+ page . find ( ".op-top-menu-user-avatar" ) . click
273
+ page . find_test_selector ( "op-menu--item-action" , text : "Administration" ) . click
274
+
275
+ # Expect classes to be gone
276
+ expect ( page ) . to have_no_css ( "body.router--work-packages-base" )
277
+ end
265
278
end
You can’t perform that action at this time.
0 commit comments