SparkDevNetwork / Rock

An open source CMS, Relationship Management System (RMS) and Church Management System (ChMS) all rolled into one.
http://www.rockrms.com
563 stars 345 forks source link

History records with NewValue date not respecting culture setting #5899

Closed ElimAdmin closed 8 hours ago

ElimAdmin commented 4 weeks ago

Description

Records in the History table, where NewValue is set to a date, have the data format inconsistently set. Sometimes the culture setting is respected, other times not. For at least the following types of 'ValueName': Transaction Date/Time, Journey Giving Stage Change Date, Last Gave, Next Expected Gift Date, Last Classification Run Date, Start Date/Time, End Date/Time

for at least EntityTypeId = 15 (Person), 77 (FinancialBatch), 84 (Transaction)

select TOP 150 * from History where NewValue LIKE '%2024' order by id desc;

Hist1

Hist2

Actual Behavior

History NewValue, which is displayed on History reports in various places (e.g. Transaction History, Person history) sets the NewValue date format inconsistently, sometimes respecting the culture setting, sometimes not.

Expected Behavior

NewValue, when this is a date format, should always be set respecting the culture setting for date format.

Steps to Reproduce

Set browser to en-NZ culture. Not sure if Organization country setting makes any difference. Generate a Batch and add a transaction. View the History table, and note the New Value settings. Observe that the browser/PC culture is not respected.

Issue Confirmation

Rock Version

Version 16.5 16.5 (1.16.5.4),

Client Culture Setting

Client Culture Setting: en-NZ, Browser settings Language = English (New Zealand).