Uploaded image for project: 'Automation for Jira Server'
  1. Automation for Jira Server
  2. JIRAAUTOSERVER-1076

Automation for Jira "Create sub-tasks" action incorrectly reports "No sub-task issue types are defined in this project" when there are more than 50 issue types in the project

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 10.4.0
    • 9.0.4
    • Actions
    • Severity 3 - Minor

      Issue Summary

      While creating a Automation Rule in a Jira Project that has more than 50 issue types. The "Create sub-tasks" action incorrectly reports "No sub-task issue types are defined in this project" because it only fetches the first 50 issue types using the API rest/api/2/issue/createmeta/<project_id>/issuetypes. 

      If the sub-task issue types are not within this first 50 issue types, No sub-task issue types are defined in this project is reported.

      Steps to Reproduce

      1. Create a project that has more that 50 issue types . As seen below, there are lot of issue types in the SCRUM project, among them are also some subtask issue type 
      2. Create a simple automation rule for this project and try to use Action "Create sub-tasks"

      Expected Results

      User should be able to create the action "Create sub-tasks" and select the required sub-task type to be created.

      Actual Results

      User is presented with the below message
       

      No sub-task issue types are defined in this project. In order to use this action you need to add some sub-task issue types first.

      Workaround

      Note that this bug only occurs when the rule is configured with a scope limited to one project that uses more that 50 issue types:

      • If the rule is configured to be executed on all projects, the bug does not occur. If the scope is set to multiple projects (including the project that has more than 50 issue types) the issue does not occur.
      • The reason behind this behavior difference is because Automation For Jira uses a different Jira REST API end point, depending on the scope of the rule

      The workaround consists in creating an automation rule with the Scope set to All projects or Multiple Projects, and to add an "issue field condition" block so that the rule is only executed for issues that belong to a specific project.

      Please note that for creating a global rule Jira Administrator permissions are required. this rule needs to be configured via the page ⚙ > System > Automation Rules, and such page is only accessible by Jira Administrators. 

        1. Screenshot 2024-10-24 at 9.11.26 AM.png
          748 kB
          Vamshi R
        2. Screenshot 2024-10-25 at 2.11.20 PM.png
          276 kB
          Vamshi R
        3. Screenshot 2024-10-25 at 2.13.40 PM.png
          349 kB
          Vamshi R
        4. Screenshot 2024-10-25 at 3.17.53 PM.png
          208 kB
          Vamshi R

              9e460d4f5ba4 Shreyans Jain
              afd2063a99c7 Vamshi R
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: