# Bug OP-6490 - Error in OpenProject::Patches::ActiveRecordJoinPartPatch module after ActiveRecord updating to 6 version

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-6490

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 10.2.2 |
| Observed in versions | 10.1.0 |
| Sprint | 10.2.2 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 10.1.x |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

In OpenProject 10.1 we started using 6 version of _Rails_ (and _ActiveRecord_), which broke the work of _OpenProject::Patches::ActiveRecordJoinPartPatch_ module. I use _WorkPackage.include\_spent\_hours_ in my own plugins. On the screen you can see that aliases are array of _Aliases::Column_ class, but not the array as it was in previous _ActiveRecord_ version.

![](/api/v3/attachments/16742/content)

Changing 42 line in _OpenProject::Patches::ActiveRecordJoinPartPatch_ module to this one fixes the issue:

`aliases_with_hours = aliases + [`  
`  ActiveRecord::Associations::JoinDependency::Aliases::Column.new('hours', 'hours')`  
`]`
