-
Notifications
You must be signed in to change notification settings - Fork 45
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
1260 report UI to not break if a report template cannot be found #1261
Conversation
pending a rework on the report template.
fix wrong assignment that save report the template id.
fall back to standard template
@@ -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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
LCOV of commit
|
There was a problem hiding this 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.
LCOV of commit
|
* 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>
* 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>
* 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>
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