Create Issues

With HAPI you can quickly and easily create issues and set parameters. 

Creating issues

Run the following script from the script console:

            Issues.create('ABC', 'Task') {
                setSummary('my first HAPI 😍')
            }        


Image creating an issue using HAPI

The script above only sets the four fields that are always required when creating an issue in Jira:

  • The project
  • Issue type
  • Summary
  • Reporter (taken from the current user).

The above code will fail if other mandatory fields are set through the configuration scheme. Either set them or test on a project with the default configuration scheme.

Fill out more fields when creating issues

You can fill out more fields when you create an issue. See our Javadocs for a full list of fields.

To fill out more fields, enter the following:

After you enter set you can use the keyboard shortcut of control + space to show available completions.

groovy
Issues.create('ABC', 'Task') { setSummary('my issue created with HAPI ') set }
Video



Related content

On this page