Jira Automation で wiki マークアップを HTML またはプレーン テキストに変換する
メールや通知を送信するためにフィールドを参照する際、望ましくないコンテンツ (具体的には wiki マークアップ) が返ってくる場合があります。たとえば、{{issue.description}}
を使用すると、以下が生成されます。
This text is {color:red}RED{color}
Wiki マークアップは、自動化機能を使って HTML またはプレーンテキストにレンダリングできます。
HTML のレンダリング
To render HTML, add .html to the end of a field. For example, {{issue.description.html}}
will produce:
<p>This text is <font color="red">RED</font></p>
上記によって説明は HTML に変換されます。
HTML メールを送信する場合、Jira では既存のスタイルをメールに反映するため、HTML での見え方に影響が及ぶことがあります。
プレーンテキストのレンダリング
Alternatively, you can extract all text from HTML/wiki markup by adding .text to the end of a field. This is often the best way to send a clean email or notification. For example, {{issue.description.text}}
will produce:
This text is RED
また、HTML 形式のメールから作成した課題から、不要な Wiki マークアップを削除することもできます (説明中のフォントや色のタグなど)。
{{issue.description.text}}
サポートされるフィールド
次のフィールドは、HTML またはプレーンテキストのレンダリングに対応しています。
説明
環境
テキスト エリア カスタム フィールド
コメント
詳細
See use cases where you might use wiki-markup and html in our Jira automation template library.
この内容はお役に立ちましたか?