Skip to content

VCST-4881: Display exact timestamp instead of relative time in log change entries#3001

Open
OlegoO wants to merge 5 commits intodevfrom
fix/VCST-4881
Open

VCST-4881: Display exact timestamp instead of relative time in log change entries#3001
OlegoO wants to merge 5 commits intodevfrom
fix/VCST-4881

Conversation

@OlegoO
Copy link
Copy Markdown
Contributor

@OlegoO OlegoO commented Apr 7, 2026

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.

image

Description

References

QA-test:

Jira-link:

https://virtocommerce.atlassian.net/browse/VCST-4881

Artifact URL:


Note

Medium Risk
Introduces a new changelog/v2/search API 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/search endpoint that returns ChangeLogSearchResult (results + totalCount) and updates the JS client to use it, while keeping the legacy changelog/search endpoint returning only OperationLog[].

On PostgreSQL, adds an OperationLogEntity configuration plus a migration to apply case-insensitive collation to PlatformOperationLog.ModifiedBy and Detail to support case-insensitive keyword searches. Separately, updates time-ago formatting to react immediately to user profile changes by binding config through $rootScope, switches the default UseTimeAgo setting to false, 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

OlegoO added 2 commits April 7, 2026 12:20
…ange entries

fix: Display exact timestamp instead of relative time in log change entries
@vc-ci
Copy link
Copy Markdown
Contributor

vc-ci commented Apr 7, 2026

🧪 Katalon Test Report — ✅ PASSED

🔢 Total ✅ Passed ❌ Failed
13 13 0
📋 Suite details
Suite Test Suites/Modules/module_Assets
Failures 0
Errors 0
Timestamp 07-04-2026T12:28:31

🔗 View run · Commit: d44cdd0

if (!string.IsNullOrEmpty(criteria.Keyword))
{
query = query.Where(x => x.ModifiedBy.Contains(criteria.Keyword)
|| x.Detail.Contains(criteria.Keyword));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

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',
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c2dee23. Configure here.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

❌ 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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 57b1b39. Configure here.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 7, 2026

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.

2 participants