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

Data view field format for Duration broken for Human-readable (precise) #170648

Closed
tomhe opened this issue Nov 6, 2023 · 3 comments · Fixed by #181391
Closed

Data view field format for Duration broken for Human-readable (precise) #170648

tomhe opened this issue Nov 6, 2023 · 3 comments · Fixed by #181391
Assignees
Labels
bug Fixes for quality problems that affect the customer experience :DataDiscovery/fix-it-week 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 App Team (Document Explorer, Saved Search, Surrounding documents, Graph)

Comments

@tomhe
Copy link

tomhe commented Nov 6, 2023

Kibana version: 8.10.4

Elasticsearch version: 8.10.4

Server OS version: Official Docker image

Browser version: Microsoft Edge 118.0.2088.76 (Official build) (64-bit)

Browser OS version: Windows 10 Enterprise 22H2

Original install method (e.g. download page, yum, from source, etc.): Docker

Describe the bug:

When setting a field format to Duration with Human-readable (precise) and input format seconds, the value 518400 (6 days) is correctly displayed as 6.00 days, but the value 691200 (8 days) is incorrectly shown as 2.14 weeks.

Steps to reproduce:
1.

PUT duration/_doc/1
{
  "seconds": 518400,
  "example": "6 days"
}

PUT duration/_doc/2
{
  "seconds": 691200,
  "example": "8 days"
}
  1. Create a data view that matches the index duration
  2. Set the format of the field seconds to Duration, input format to Seconds, output format to Human-readable (precise)
  3. Create a new Lens visualization using the created data view:
    • Type: Bar horizontal
    • Vertical axis: Top 5 values of example.keyword
    • Horizontal axis: Sum of seconds
    • Visual options: Labels show
  4. Observe the incorrect label 2.14 weeks for the break-down for 8 days
  5. Change the data view output format for seconds to Human-readable (approximate)
  6. Observe the correct label 8 days for the break-down for 8 days

Expected behavior: The label should show the correct value when using Human-readable (precise) output format.

Screenshots (if relevant):

Data view field format:
Data view field format

Incorrect Human-readable (precise)
Human-readable (precise)

Correct Human-readable (approximate)
Human-readable (approximate)

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

Any additional context:

@tomhe tomhe added the bug Fixes for quality problems that affect the customer experience label Nov 6, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Nov 6, 2023
@tomhe tomhe changed the title Data view field format for Duration broken for *Human-readable (precise)* Data view field format for Duration broken for Human-readable (precise) Nov 8, 2023
@jsanz jsanz added the Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Graph) label Nov 20, 2023
@elasticmachine
Copy link
Contributor

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

@botelastic botelastic bot removed the needs-team Issues missing a team label label Nov 20, 2023
@jughosta
Copy link
Contributor

Linking to #154745

@kertal kertal added 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 labels Nov 22, 2023
@mattkime
Copy link
Contributor

mattkime commented Feb 2, 2024

Reproduced the problem, fixing the problem looks rather involved.

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 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 App Team (Document Explorer, Saved Search, Surrounding documents, Graph)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants