Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle aliases more appropriately #8414

Open
wants to merge 2 commits into
base: hotfix-7.10.x
Choose a base branch
from

Conversation

Jason-Dang
Copy link
Contributor

@Jason-Dang Jason-Dang commented Dec 31, 2019

Description

Motivation and Context

Sub Panel aliases experience some weird behaviour due to bean and list view query caching.
The first value gets processed correctly, but is then cached in the BeanFactory which ultimately causes the alias to be cached by the list view query. Ultimately this leads to a check on the cache always skipping any processing for subsequent record values, resulting in the values being set straight from the DB etc. Additionally whenever the logic is fired it coverts to user date time format regardless of field type meaning aliases can only really be used on date time columns.

Changes

  • Bypass cache check so aliased values always set.
  • Check dbType before casting values to datetime.

How To Test This

  1. On any module with an Activities Sub Panel, add a couple Task records with various due dates.
  2. See that the first is processed while subsequent records are not.
  3. Apply the fix and see them all processed.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • My code follows the code style of this project found here.
  • My change requires a change to the documentation.
  • I have read the How to Contribute guidelines.

- Bypass cache check so aliased values always set.
- Check dbType before casting values to datetime.
@SuiteBot
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


j.dang seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants