mattermost-plugin-jira icon indicating copy to clipboard operation
mattermost-plugin-jira copied to clipboard

Quotes within a Jira comment do not display correctly

Open DHaussermann opened this issue 5 years ago • 4 comments
trafficstars

When adding quotes within a comment using the editor and saving from the new Jira view, the quotes do not display correctly in Mattermost. Screen Shot 2020-07-22 at 9 15 27 AM

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

Screen Shot 2020-07-22 at 9 51 05 AM Screen Shot 2020-07-22 at 9 51 46 AM

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 avatar Jul 22 '20 13:07 DHaussermann

@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

  1. Bold in jira. If I bold a word in jira, in mm it comes as italics. Screenshot from 2023-03-07 13-51-31 Screenshot from 2023-03-07 13-51-12

2)Code block in jira. If I comment using a code block in jira, in mm it comes with {noformat} tag. Screenshot from 2023-03-07 13-56-00 Screenshot from 2023-03-07 13-55-47

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 avatar Mar 07 '23 08:03 Kshitij-Katiyar

@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 avatar Jul 17 '23 15:07 DHaussermann

@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 avatar Jul 20 '23 16:07 Kshitij-Katiyar

@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.

mickmister avatar Aug 02 '23 11:08 mickmister