I’m trying to integrate a third-party tool with Jira server via REST API. Currently we have a customized Jira used by our client with a business specific issue types. Basically all I need is to be able to create an issue of a given type, get response (success/error) and get metadata (list of required and optional fields) for that tool via REST API.
We have a create issue page on WebUI, where user can submit his request. But the problem is all validation logic is “smashed” between some Javascript code, Behaviours and SIL Programs Manager add-ons, AJS scripts, Jira native fields configuration etc. So I can’t use “plain” Jira REST API directly because it creates issues without taking in account business rules of a given issue type - e.g. requires fields, one fields can have values depending on another field’s value, an attachment is a required as part of an issue etc.
My question is what is the best way to make an integration with Jira. I want to be sure if someone will try to create an issue via REST API, the data is consistent according to the issue business rules. I was thinking to write some "proxy" REST API, which will do the all validation needed and create (or edit) / reject the request. We've developed a separate Jira plugin which serves some scenarios. So, I can add those API to the plugin.
Or, use Jira REST API endpoints like POST /issue (and PUT /issue/), and I have to define a new screen for it, set all required fields via standard Jira settings, set Cascading fields rules and the standard validator will check if everything is ok out-of-the box? Sorry, I’m new to Jira and not sure if my current understanding is correct now.
Thanks