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

[FieldFormatters] Human-readable duration shows "a few seconds" when duration is "0" #101000

Closed
Dosant opened this issue May 31, 2021 · 3 comments · Fixed by #164659
Closed

[FieldFormatters] Human-readable duration shows "a few seconds" when duration is "0" #101000

Dosant opened this issue May 31, 2021 · 3 comments · Fixed by #164659
Assignees
Labels
bug Fixes for quality problems that affect the customer experience :DataDiscovery/fix-it-week Feature:FieldFormatters good first issue low hanging fruit impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.

Comments

@Dosant
Copy link
Contributor

Dosant commented May 31, 2021

Kibana version: master (~7.14)
Describe the bug:

Human-readable duration field formatter outputs a few seconds for 0 value

Steps to reproduce:

  1. Create a duration human-readable field formatter on index pattern
  2. Check-in discover how a 0 value shown as a few seconds

Expected behavior:

I think we should output 0 following other formatting options. e.g. 0.00 seconds

Screenshots (if relevant):

Screen Shot 2021-05-31 at 15 17 12

Any additional context:

Noticed while testing #100540 (review)

@Dosant Dosant added bug Fixes for quality problems that affect the customer experience loe:small Small Level of Effort Team:AppServices Feature:FieldFormatters impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. labels May 31, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@Dosant Dosant added the good first issue low hanging fruit label May 31, 2021
@rbrishabh
Copy link

Hey! I would like to take a shot at this! I'll create a PR

@exalate-issue-sync exalate-issue-sync bot added loe:medium Medium Level of Effort and removed loe:small Small Level of Effort labels Jun 14, 2021
@exalate-issue-sync exalate-issue-sync bot added loe:small Small Level of Effort and removed loe:medium Medium Level of Effort labels Aug 16, 2022
@petrklapka petrklapka added Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. and removed Team:AppServicesSv labels Dec 12, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@sophiec20 sophiec20 removed the triaged label Apr 24, 2023
ninoslavmiskovic added a commit that referenced this issue Aug 24, 2023
…onds" (#164659)

This PR solves the issue when a user is formatting fields that are "0"
to be Human Friendly, then it shows "a few seconds" instead of "0.00
seconds"

This PR changes it to say: "0.00 seconds". 

I have also updated the test-case for it. 

Video of the issue - tested on 8.11 snapshot: 


https://github.com/elastic/kibana/assets/108192783/082329bf-6c62-4eb5-b28e-212a848f6f65

Screenshot of the fix: 

<img width="1361" alt="Skærmbillede 2023-08-24 kl 10 36 15"
src="https://github.com/elastic/kibana/assets/108192783/cc9a4490-e8b3-48a6-952e-61e9cd0aff81">


Fixes  #101000

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Matthias Wilhelm <[email protected]>
Co-authored-by: Davis McPhee <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience :DataDiscovery/fix-it-week Feature:FieldFormatters good first issue low hanging fruit impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants