This routine is available starting with katl-commons 2.0.2 for Jira 5.x or katl-commons 1.1.9 for Jira 4.3.x/4.4.x.
This routine is available for Jira server and cloud deployment options.
Returns a list of keys for all the projects in Jira.
string  projects = allProjects();
Results: prints a list with all the project keys in Jira. If we have 2 projects PRJ and TST, the logs will show PRJ|TST