Allow External System Import by CSV to use validators that check the parent information

XMLWordPrintable

    • 2
    • 1

      Issue Summary

      Currently, using a few different apps such as JMWE, for example, it is possible to add a validator to prevent users from creating subtasks under a specific issue type (which is another feature request JRACLOUD-7990).

      This validator currently works on the UI, however, on the CSV Import, the validator either does not work, allowing any subtasks to be created under any issue types, or blocks any subtasks from being created.

      This happens because of the way the import is done, it first creates the issues, then the links, so at the moment the issue is created, there is no information on the parent of the issue.

      Steps to Reproduce

      1. Add a validator to the creation transition of a subtask - the validator can be a Build-your-own (scripted) by JMWE for example
      2. On the validator, check for the parent issue type - to do that on JMWE, we can use, for example !!issue.parent.issueType && issue.parent.issueType.name != "[Issue Type that shouldn't have subtasks]"
      3. Publish the workflow
      4. Use a CSV on the External system import to try to import subtasks to an invalid issue type

      Expected Results

      The Import should prevent the creation of subtasks only if the parents defined have the issue types defined on the rule

      Actual Results

      The Import prevents the creation of all subtasks

      Workaround

      Option 1:
      1. Remove the validator whenever you need to import CSV issues
      Option 2:
      1. Change the validator to something similar to issue.issueType.name == "Sub-task type" && !!issue.parent ? issue.parent.issueType.name != "[Issue Type that shouldn't have subtasks]" : true
      2. Create an automation rule to check when issues are created, if the issues were created under a wrong issue type, then inform the reporter and delete the issue, for example
      • This option does prevent the creation of subtasks on the wrong issue type through the UI, however, it allows the creation of subtasks even with the validator on, by importing a CSV.

            Assignee:
            Unassigned
            Reporter:
            Gabi Paludo (Inactive)
            Votes:
            14 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: