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

[reporting] formatters are loaded from index pattern saved object, should be loaded via index patterns service #84388

Closed
mattkime opened this issue Nov 26, 2020 · 5 comments · Fixed by #88303
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Reporting:Framework Reporting issues pertaining to the overall framework impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. needs-team Issues missing a team label SharedUX/fix-it-week Bugs that have been groomed and queued up for the team's next fix it week v8.0.0

Comments

@mattkime
Copy link
Contributor

mattkime commented Nov 26, 2020

#82223 removed fields from the index pattern saved object (except for scripted fields).

x-pack/plugins/reporting/server/export_types/csv/generate_csv/index.ts:86 loads the index pattern saved object, looks at the field list and loads all the field formatters.

pseudo code recommendation -

const fields (assume defined);
const indexPattern = await indexPatterns.get(id);
fields.reduce((collector, field) => {
  const indexPatternField = indexPattern.fields.getByName(field);
  collector[field] = indexPattern.getFormatterForField(indexPatternField);
  return collector;
}, {});

Its possible that the majority of the work will involve bootstraping the index patterns service.

@mattkime mattkime added bug Fixes for quality problems that affect the customer experience regression (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead Team:AppServices labels Nov 26, 2020
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-reporting-services (Team:Reporting Services)

@mattkime
Copy link
Contributor Author

mattkime commented Dec 3, 2020

x-pack/plugins/reporting/server/export_types/csv/generate_csv/field_format_map.ts:47 might be a better starting point. The field list will no longer be available via the saved object except for scripted fields.

@tsullivan
Copy link
Member

This issue may be closed out when CSV export switches to using SearchSource on the server rather than push index pattern info through the job params. That work is prioritized as it will be needed to support Runtime Fields with CSV Export: #81079

@tsullivan
Copy link
Member

@mattkime I'm not 100% sure there was an issue here, but FYI this PR: https://github.com/elastic/kibana/pull/88303/files is re-writing CSV Export. The field list (which columns to show) comes from a serialized SearchSource object.

Mind taking a look at #88303 and see if that goes in the right direction?

@tsullivan tsullivan added Team:Reporting Services impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. labels Feb 25, 2021
@Dosant Dosant added the SharedUX/fix-it-week Bugs that have been groomed and queued up for the team's next fix it week label Mar 1, 2021
@sophiec20 sophiec20 added Feature:Reporting:Framework Reporting issues pertaining to the overall framework and removed (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead labels Aug 21, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label Aug 21, 2024
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 Feature:Reporting:Framework Reporting issues pertaining to the overall framework impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. needs-team Issues missing a team label SharedUX/fix-it-week Bugs that have been groomed and queued up for the team's next fix it week v8.0.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants