Closed twodrops closed 2 years ago
@haiyangToAI: Please check also if other options are missing as well.
Hi @twodrops @danwos ,
When you use sne import to extract data from external services and store in a needs.json file, you need to config how the created needs object will look like, in other words, what options it shall have.
To do that, config the mappings in needs_services, add the options you want to have.
In this example: https://useblocks.com/sphinx-needs-enterprise/services/jira.html#config, there are four options: id, type, title, status. These are the default mappings. If you want the new created needs have 'tags' option, then just config 'tags' there.
You are right, this would be a solution.
I'm asking myself if there should be empty default parameters so that the generated needs.json is valid for Sphinx-Need via needimport
.
So other elements like type, status, title are also mandatory and a user may forget to configure it.
Or at least we should throw a warning if mapping parameters are not configured so that it is not compatible with Sphinx-Needs.
tags
can be an empty list like 'status'
We will add a check for certain elements, that they must be set to create a valid need.json file.
"tags" is a mandatory attribute for
needimport
. sni import does not create this which leads to import error.