WIth content replacements you can modify and clean work item text content when it is loaded into Bravo Notes.
This feature is commonly used to
- Remove inline styles from HTML fields
- Remove unnecessary white space at the end of HTML fields
- Make work item titles more readable by removing prefixes that don't mean anything to the target audience of the document to be created
Content replacements are based on regular expressions. If you are not failiar with regular expressions please get some help from a developer in your team or reach out to support for assistence.
Create a content replacement rule to remove inline styles from HTML fields
For our example lets assume that work items often include styling information pasted into Azure DevOps from sources like Word, SharePoint or Confluence.
This style information could look like this in our work item HTML content:
<p style="font-family: Calibri; font-size: 14px">Some work item description content</p>
This inline style information will conflict with the style of your release notes and may result in different fonts and font sizes in your document.
Let's create a content replacement rule to fix that:
- Go to the Work Items tab
- In the ... menu select Work item settings
- Add a content replacement Pattern: style=".+?"
- Leave the Replace with field empty
- Dismiss the settings panel
- Click Save to save your settings
- In the ... menu click Refresh work items to apply the replacements to work items already in yourlist
Now everytime work item data is loaded into Bravo Notes the replacement rules will run and clean your HTML from inline styles.
Currently this happens globally to every text or HTML field - so be careful to make the replacement patterns specific enough.