Text Validation plugin

You’re going to have the same issues as Redact PII on Confluence :frowning: You can do it - but it will be a lot of work to do it properly.

You can just go the javascript route (take a look at Downloadable plugin resources - the context you’d be looking at is atl.general) and just have some javascript that overrides all form submissions and does the validation there prior to it submitting it. The issue with this is that there are some functionality that don’t use forms (they use input fields - but not the form for submission) and instead just passes things through javascript/ajax directly to the rest api. Which brings us to the “real” fix…

In order to do it properly you’ll have to intercept the IssueUpdated event in java but since this is happening after the update - you’ll need to take a look at ChangeHistoryManager (Atlassian JIRA 7.0.8 API) and then update it as well as any other places that might have it.

In the end it’s very much going to be chasing your own tail. :frowning: My suggestion would be to narrow where you want to validate the data(in that case you might be able to do the javascript route). Take a look at perhaps making your own custom fields? Or perhaps a workflow validator ( https://developer.atlassian.com/jiradev/jira-platform/building-jira-add-ons/jira-plugins2-overview/jira-plugin-module-types/workflow-plugin-modules ) so that you can block an issue from transitioning.

2 Likes