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

[BUG] Default report template does not add case summary #61

Closed
cudeso opened this issue Jan 26, 2022 · 3 comments
Closed

[BUG] Default report template does not add case summary #61

cudeso opened this issue Jan 26, 2022 · 3 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@cudeso
Copy link

cudeso commented Jan 26, 2022

Describe the bug
When I use the default investigation report template the placeholder {{ case.description|markdown }} is replaced with "Empty description", although there is a case description added.

Not sure if it's related, but when I remove the MD part in the template

##BEGIN STYLE default##
•	##ul##
1.	##ol##
##table_header##
##table_cell##

##paragraph##
##code##
##strong##
##italic##
##END STYLE##
...

there is an error

app_1 | 2022-01-26 16:59:39 :: ERROR :: rendering_error :: __init__ :: An error occurred during rendering. Style default not defined (fsvmxdlmztkdqejiib)

@cudeso cudeso added the bug Something isn't working label Jan 26, 2022
@whikernel
Copy link
Contributor

whikernel commented Jan 26, 2022

Thanks for reporting !

The data for case, fed to the report generator is the same as the one in endpoint case/export. Could you please check that under data > case you have a valid description field ?

For the second part, yes this bit is needed by the generator to be able to apply the style to the document. We'll update the documentation about that.

@cudeso
Copy link
Author

cudeso commented Jan 26, 2022

This is in the output

{"data": {"assets": [], "case": {"close_date": null, "description": "# Hello There\n\n## Another one", "for_customer": "zdffdemoabc", "name": "#6 - New case for TS import", "open_date": "Tue, 25 Jan 2022 00:00:00 GMT", "opened_by": "administrator", "soc_id": ""},

@whikernel
Copy link
Contributor

whikernel commented Jan 26, 2022

There's indeed an issue on the markdown titles rendering. Some tags like **my bold text** are rendered correctly but not titles. So your summary doesn't appear at all since it's all titles.

A temporary fixe is to remove the |markdown from the template, in which case the markdown will be in cleartext.
In any case we'll fix that, thank for the report👍

@whikernel whikernel added this to the v1.3.1 milestone Jan 26, 2022
@whikernel whikernel modified the milestones: v1.4.0, v1.4.1 Mar 7, 2022
@whikernel whikernel modified the milestones: v1.4.1, v1.5.0 Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

3 participants