VCST-4881: Display exact timestamp instead of relative time in log change entries#3001
VCST-4881: Display exact timestamp instead of relative time in log change entries#3001
Conversation
…ange entries fix: Display exact timestamp instead of relative time in log change entries
src/VirtoCommerce.Platform.Web/wwwroot/css/themes/main/sass/modules/_base-modules.sass
Outdated
Show resolved
Hide resolved
🧪 Katalon Test Report — ✅ PASSED
📋 Suite details
|
| if (!string.IsNullOrEmpty(criteria.Keyword)) | ||
| { | ||
| query = query.Where(x => x.ModifiedBy.Contains(criteria.Keyword) | ||
| || x.Detail.Contains(criteria.Keyword)); |
There was a problem hiding this comment.
Keyword search filters on wrong field
Medium Severity
The keyword search filters on x.ModifiedBy but the UI "Login" column displays createdBy. The PR description states keyword search is "by Login and Details," so the query needs to match the displayed column. While CreatedBy and ModifiedBy are identical on insert for operation log records, searching the wrong field is semantically incorrect and will produce wrong results if any log entry is ever updated.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit c2dee23. Configure here.
| // Service provider get/set function pairs for language, regional format, time zone and time ago settings | ||
| .factory('platformWebApp.i18n', ['platformWebApp.fallbackLanguage', 'platformWebApp.fallbackRegionalFormat', 'platformWebApp.fallbackTimeAgoSettings', 'platformWebApp.common.languages', 'platformWebApp.common.locales', 'platformWebApp.common.timeZones', 'platformWebApp.userProfileApi', '$translate', 'tmhDynamicLocale', 'moment', 'amMoment', 'angularMomentConfig', 'amTimeAgoConfig', 'platformWebApp.fallbackTimeFormat', | ||
| function (fallbackLanguage, fallbackRegionalFormat, fallbackTimeAgoSettings, languages, locales, timeZones, userProfileApi, $translate, dynamicLocale, moment, momentService, momentConfig, timeAgoConfig, fallbackTimeFormat) { | ||
| .factory('platformWebApp.i18n', ['platformWebApp.fallbackLanguage', 'platformWebApp.fallbackRegionalFormat', 'platformWebApp.fallbackTimeAgoSettings', 'platformWebApp.common.languages', 'platformWebApp.common.locales', 'platformWebApp.common.timeZones', 'platformWebApp.userProfileApi', '$translate', 'tmhDynamicLocale', 'moment', 'amMoment', 'angularMomentConfig', 'amTimeAgoConfig', 'platformWebApp.fallbackTimeFormat', '$rootScope', |
There was a problem hiding this comment.
JS fallback useTimeAgo mismatches new server default
Low Severity
The fallbackTimeAgoSettings constant still has useTimeAgo: true, but the server-side UseTimeAgo default was changed to false. During initial page load (before the user profile is fetched), all date cells briefly display in "time ago" format before switching to full dates, creating a visible flash inconsistent with the intended default.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit c2dee23. Configure here.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 3 total unresolved issues (including 2 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 57b1b39. Configure here.
| GroupName = "Platform|User Profile", | ||
| ValueType = SettingValueType.Boolean, | ||
| DefaultValue = true | ||
| DefaultValue = false |
There was a problem hiding this comment.
JS fallback conflicts with new C# default value
Low Severity
The UseTimeAgo C# DefaultValue changed from true to false, but the JavaScript fallback constant platformWebApp.fallbackTimeAgoSettings in i18n.js still has useTimeAgo: true. During every page load, changeTimeAgoSettings() runs with the JS fallback before user profile settings arrive from the server, briefly activating "time ago" formatting. Once the real setting (now defaulting to false) loads, all date columns visibly flip from relative times to full dates. Previously both defaults were true, so no flash occurred.
Reviewed by Cursor Bugbot for commit 57b1b39. Configure here.
|





feat: Refactored the Operation Log blade UX: added keyword search (by Login and Details), filter panel (by Operation Type and Modified date), pagination, and column sorting (default: Time descending).
fix: Extended the Time column on the Operation Log to include milliseconds (e.g. Jan 12, 2026 1:56:26.033 PM) for precise troubleshooting.
fix: Fixed "Use time ago" toggle in User Profile to apply immediately without requiring a page refresh (F5). Previously, the am-time-ago directives cached config values at creation time and never picked up changes until reload.
feat: Changed the full-date format for all grid date columns (e.g. Orders, Change Log) from short (3/9/26 8:28 PM) to medium (Mar 9, 2026 8:28:45 PM) — includes seconds and full year for better readability and troubleshooting.
Description
References
QA-test:
Jira-link:
https://virtocommerce.atlassian.net/browse/VCST-4881
Artifact URL:
Note
Medium Risk
Introduces a new
changelog/v2/searchAPI shape used by the UI and adds a PostgreSQL migration altering collations on log columns; both can affect existing clients and query behavior.Overview
Improves the Operation Log (change log) UX and API for precise, filterable auditing. The operation log blade is refactored to use server-side search with keyword filtering, operation-type/date filters, pagination, and external column sorting, and the Time column now renders an exact timestamp including milliseconds.
Adds a new
POST api/platform/changelog/v2/searchendpoint that returnsChangeLogSearchResult(results + totalCount) and updates the JS client to use it, while keeping the legacychangelog/searchendpoint returning onlyOperationLog[].On PostgreSQL, adds an
OperationLogEntityconfiguration plus a migration to apply case-insensitive collation toPlatformOperationLog.ModifiedByandDetailto support case-insensitive keyword searches. Separately, updates time-ago formatting to react immediately to user profile changes by binding config through$rootScope, switches the defaultUseTimeAgosetting tofalse, and uses a more detailed full-date format ("medium") for time-ago full-date rendering.Reviewed by Cursor Bugbot for commit 330a34c. Bugbot is set up for automated code reviews on this repo. Configure here.
Image tag:
ghcr.io/VirtoCommerce/platform:3.1017.0-pr-3001-330a-vcst-4881-330a34c6