Hi everyone,
We are using JMWE to make a validation using Jira expressions in our workflow.
What we want to do is to validate that a custom field (Paragraph type) has value, does not include images, account IDs (using @), links or bullet lists.
Currently we have:
If your Paragraph type field is using rich-text renderer then the field values are stored in Atlassian document format and you can use below Jira expression to disallow such values.
let cf = JSON.stringify(issue.customfield_10171);
cf && (
cf.match('"type":"media"') ||
cf.match('"type":"mention"') ||
cf.match('"type":"inlineCard"') ||
cf.match('"type":"blockCard"') ||
cf.match('"type":"link"') ||
cf.match('"type":"bulletList"') ||
cf.match('"type":"orderedList"')
) == null
Note: I have used media to disallow all media types (images/videos/docs etc.) and inlineCard/blockCard/link for URLs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.