Skip to content

Resolve "Time displayed in hover of environment deployments."

Etienne Baqué requested to merge 58475-fix-time-display into master

What does this MR do?

This MR addresses an inconsistency mentioned in #58475 (moved): time in the tooltip on the deployment page are in a different time zone then time in a tooltip on the pipeline page.

In addition to getting rid of this inconsistency, by changing the way time shows up in the deployment page, this MR presents:

  • a refactoring of a helper method, time_ago_with_tooltip into a new class
  • rspec tests for this new class.

I noticed that time_ago_with_tooltip was used in multiple place in the code base. Since the scope of this issue is limited to two pages, the new behavior for time display on the deployment page is driven by a new parameter, timezoned. Having control on this new behavior and the fact that I was adding yet another parameter to that helper method were my motivations for refactoring.

Does this MR meet the acceptance criteria?

Conformity

Performance and testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Closes #58475 (moved)

Edited by Etienne Baqué

Merge request reports