Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-28146

Mentions does not respect plain-text renderer or {noformat} blocks

      When a field uses the plain-text renderer, or part of a field is inside a {noformat} block, we should not parse that text for mentions.

      Reasons:

      • I don't think it's right to have a field type that has historically been pure, plain text; to now respond to one single markup tag in one specific way.
      • In cases where plain-text has been explicitly enabled (that is, in behind-the-firewall instances, or where {noformat} is used), it's because the admin specifically wants that value to be treated as plain-text - e.g. stack traces or logs. If we no longer respect that, eventually we'll get customers asking for a plain-plain text field.
      • Plain-text is also used for performance reasons that may be impacted by this. If large amounts of text are accidentally inserted into a wiki-rendered JIRA field, the issue becomes unviewable and uneditable. In these cases, Support switches the field renderer to plain-text to fix it up. According to Studio support, this happens roughly once a month on hosted. We need to be sure that Mentions' addition of rendering to this field type does not impact this use case.
      • The current behaviour is not that great - if you mention someone in a plain-text field, you get the raw [~pwyatt] markup appearing on the View Issue screen (which means nothing to end-users on a plain-text system) and the whole field is rendered as wiki markup in the Mentions email (which is incorrect).
      • In Confluence, text inside {code} blocks is not parsed for Mentions.

      That said, disabling Mentions in plain-text mode would essentially turn off this feature for most OnDemand customers, where the default comment/description renderer is plain-text. Obviously that's not desirable.
      Some solutions:

      • In the Mentions advertising, link to the instructions for enabling wiki markup.
      • Send it out dark in 5.0 OnDemand for plain-text customers, and in the next OnDemand release, add a one-click feature for admins to convert all their comment/description fields to wiki renderer. This would get around the pain that is the Field Configuration administration pages.

            [JRASERVER-28146] Mentions does not respect plain-text renderer or {noformat} blocks

            We don't seem to have had any customer complaints about this, and the user name completion seems like it could be useful. Should we fix this at all?

            Eric Dalgliesh added a comment - We don't seem to have had any customer complaints about this, and the user name completion seems like it could be useful. Should we fix this at all?

            mlassau that's true, however I'll just add that all you have to do is press ESC to get @mark.

            Andreas Knecht (Inactive) added a comment - mlassau that's true, however I'll just add that all you have to do is press ESC to get @mark.

            This leads to a pretty shit user experience.

            If they type eg:

            @fred
            What version did you see this in?
            

            what they get is:

            [~fred]
            What version did you see this in?
            

            Mark Lassau (Inactive) added a comment - This leads to a pretty shit user experience. If they type eg: @fred What version did you see this in? what they get is: [~fred] What version did you see this in?

            I think this is too big and risky to tackle right now in 5.0. this is because we need to disable javascript behaviour in plan-text fields AND within no-format blocks is tricky. Add to this the need to change server-side comment scanning behaviour to not scan fields that use the plain text renderer (and exclude content in noformat blocks). We need to mention this in support readiness.

            Paul Slade added a comment - I think this is too big and risky to tackle right now in 5.0. this is because we need to disable javascript behaviour in plan-text fields AND within no-format blocks is tricky. Add to this the need to change server-side comment scanning behaviour to not scan fields that use the plain text renderer (and exclude content in noformat blocks). We need to mention this in support readiness.

            Mentions does not depend on Wiki markup being enabled to actually send the mentions emails, but it does rely on it to transform the ... format mentions into an HTML link with the user's full name in it.

            There are two options I feel that would help resolve this:

            1. As Penny suggests: Remove mentions entirely from non-wiki markup fields or
            2. Create a new subset of the wiki-markup transform specific to mentions which (when and if wiki-markup is disabled) replaces the wiki markup name to a non-linked full name of the user.

            Thoughts?

            David Elkan (Inactive) added a comment - Mentions does not depend on Wiki markup being enabled to actually send the mentions emails, but it does rely on it to transform the ... format mentions into an HTML link with the user's full name in it. There are two options I feel that would help resolve this: As Penny suggests: Remove mentions entirely from non-wiki markup fields or Create a new subset of the wiki-markup transform specific to mentions which (when and if wiki-markup is disabled) replaces the wiki markup name to a non-linked full name of the user. Thoughts?

            Penny, can you please add some screenshots here.

            Also what was the summary of your conversation with Dave?

            Roy Krishna (Inactive) added a comment - Penny, can you please add some screenshots here. Also what was the summary of your conversation with Dave?

              Unassigned Unassigned
              pwyatt Penny Wyatt (On Leave to July 2021)
              Affected customers:
              1 This affects my team
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: