Data validation in JIRA reports

Whenever we take user inputs, it is always a good idea to validate them to make sure the input is in the format that is expected. The same applies to reports also. JIRA reports, as we have seen in the previous recipes, accept user inputs based on which reports are generated. In the example we used, a project is selected and the details of issues in the selected project are displayed.

In the previous example, the likelihood of a wrong project being selected is as low, as the project is selected from a valid list of available projects. But still, the final URL that generates the report can be tampered with to include a wrong project ID, and so it is best to do the validation no matter how the input is taken.

Getting ...

Get JIRA Development Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.