-
Type:
Suggestion
-
Resolution: Low Engagement
-
Component/s: Import/Export - External System Import
-
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
- Add a validator to the creation transition of a subtask - the validator can be a Build-your-own (scripted) by JMWE for example
- 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]"
- Publish the workflow
- 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:
- Remove the validator whenever you need to import CSV issues
Option 2:
- 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
- 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.
- relates to
-
MIG-680 Workflow Validator for Link Issues crashes External System Import CSV file
-
- Closed
-