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

1260 report UI to not break if a report template cannot be found #1261

Merged

Conversation

PiTrem
Copy link
Member

@PiTrem PiTrem commented Apr 3, 2023

  • disabled Admin Report Template management and set paths for report type (do not use the report_template.attachment (also due to 1258 avoid setting key when creating attachment #1259 ))

  • save report type in report (fix wrong assignment)

  • fall back to standard report if the report-template does not exist anymore in the db

@PiTrem PiTrem linked an issue Apr 3, 2023 that may be closed by this pull request
@@ -219,6 +218,7 @@ def is_int?
requires :imgFormat, type: String, default: 'png', values: %w[png eps emf]
requires :fileName, type: String, default: 'ELN_Report_' + Time.now.strftime('%Y-%m-%dT%H-%M-%S')
requires :templateId, type: String
optional :templateType, type: String, default: 'standard', values: ReportTemplate::REPORT_TYPES
Copy link

Choose a reason for hiding this comment

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

Metrics/ClassLength: Class has too many lines. [240/200]

else
report_template.report_type
end
# tpl_path = if report_template.attachment
Copy link

Choose a reason for hiding this comment

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

Metrics/AbcSize: Assignment Branch Condition size for create_docx is too high. [<4, 25, 8> 26.55/25]

else
report_template.report_type
end
# tpl_path = if report_template.attachment
Copy link

Choose a reason for hiding this comment

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

Metrics/CyclomaticComplexity: Cyclomatic complexity for create_docx is too high. [8/7]

else
report_template.report_type
end
# tpl_path = if report_template.attachment
Copy link

Choose a reason for hiding this comment

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

Metrics/MethodLength: Method has too many lines. [37/30]

# report_template.attachment.attachment_url
# else
# report_template.report_type
# end
Copy link

Choose a reason for hiding this comment

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

Layout/CommentIndentation: Incorrect indentation detected (column 0 instead of 6).

# else
# report_template.report_type
# end
tpl_path = self.class.template_path(template)
Copy link

Choose a reason for hiding this comment

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

Style/IdenticalConditionalBranches: Move tpl_path = self.class.template_path(template) out of the conditional.

@github-actions
Copy link

github-actions bot commented Apr 3, 2023

LCOV of commit 50d183b during Continuous Integration #775

Summary coverage rate:
  lines......: 59.8% (11727 of 19617 lines)
  functions..: no data found
  branches...: no data found

Files changed coverage rate: n/a

Copy link
Contributor

@FabianMauz FabianMauz left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@github-actions
Copy link

github-actions bot commented Apr 4, 2023

LCOV of commit 5e22999 during Continuous Integration #783

Summary coverage rate:
  lines......: 59.8% (11729 of 19620 lines)
  functions..: no data found
  branches...: no data found

Files changed coverage rate: n/a

@PiTrem PiTrem merged commit 3d2a8fa into main Apr 6, 2023
2 checks passed
PiTrem added a commit that referenced this pull request Apr 11, 2023
* define report types

* Report to use default template file

pending a rework on the report template.

* disable Admin Report Template Managment

* devmode: report job to perform now

* Report: save template type in reports.template in report

fix wrong assignment that save report the template id.

* Report: alert if template not found when reloading an archive settings

fall back to standard template

* add more tests for creating  reports

---------

Co-authored-by: FabianMauz <fmauz@ipb-halle.de>
@PiTrem PiTrem deleted the 1260-report-ui-to-not-break-if-a-report-template-cannot-be-found branch April 11, 2023 09:54
mekkyz pushed a commit that referenced this pull request Sep 21, 2023
* define report types

* Report to use default template file

pending a rework on the report template.

* disable Admin Report Template Managment

* devmode: report job to perform now

* Report: save template type in reports.template in report

fix wrong assignment that save report the template id.

* Report: alert if template not found when reloading an archive settings

fall back to standard template

* add more tests for creating  reports

---------

Co-authored-by: FabianMauz <fmauz@ipb-halle.de>
baolanlequang pushed a commit that referenced this pull request Mar 5, 2024
* define report types

* Report to use default template file

pending a rework on the report template.

* disable Admin Report Template Managment

* devmode: report job to perform now

* Report: save template type in reports.template in report

fix wrong assignment that save report the template id.

* Report: alert if template not found when reloading an archive settings

fall back to standard template

* add more tests for creating  reports

---------

Co-authored-by: FabianMauz <fmauz@ipb-halle.de>
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.

Report UI to not break if a report template cannot be found
2 participants