mattermost-plugin-jira
mattermost-plugin-jira copied to clipboard
Quotes within a Jira comment do not display correctly
When adding quotes within a comment using the editor and saving from the new Jira view, the quotes do not display correctly in Mattermost.

When editing the comment in the Jira UI, it seems the raw text is different and are webhook is correctly sending the raw text.

Steps:
- Install a Jira cloud instance a create a webhook that includes new comments
- Open target jira issue in the new view (ensure URL does not have ?oldIssueView=true) appended
- Type a comment
- Add a quote using the formatting from the WYSIWYG
- Save
Observed: Quotes show as {quote} which seems to be the raw text when the new view wants to render quotes.
@DHaussermann @hanzei I am able to reproduce this issue but I am not able to change to the old issue view in my instance maybe jira discontinued that. Secondly, this kind of bug for formatting is not just for quotes, I am able to find a bunch more like
- Bold in jira. If I bold a word in jira, in mm it comes as italics.

2)Code block in jira. If I comment using a code block in jira, in mm it comes with {noformat} tag.

There can be many more examples like these. From my understanding the only solution for this would be when we get the webhook event we can extract its body and create a regex to handle all these examples (it's very difficult as we don't know all the cases) first extract the tags and replace them with the supported versions in mattermost.
If you have any insights or suggestions please feel free to answer them.
@Kshitij-Katiyar ya the issue is quite old. I'm not surprised at all that "old issue view in" is no longer available in Cloud.
Yes it possible alot of mark down is affected.
@DHaussermann @hanzei But the difference still persists in the markdowns. Can you please share your views on how to fix them as there are many unknowns here and how to fix them.
@Kshitij-Katiyar There are some open (technically closed) issues for Jira & Mattermost markdown compatibility:
- https://github.com/mattermost/mattermost-plugin-jira/issues/147
- https://github.com/mattermost/mattermost-plugin-jira/issues/148
As well as an (I believe abandoned) effort to solve this holistically with https://github.com/nathanmkaya/goldmark-extended mentioned here https://github.com/mattermost/mattermost-plugin-jira/issues/147#issuecomment-568272983. I think that solution is a large undertaking, and I'm thinking we shouldn't go down that route, though just sharing here for completeness.
In general, we've viewed this as "won't fix", since there are so many differences between Jira's formatting and common uses of markdown. We can treat each finding individually and solve them case-by-case, but I don't think the effort is warranted to devote dev cycles on these particular issues at the moment. Personally, I think these individual findings would be good as separate HW tickets for contributors to work on.