Dataset. how to create a dataset and assigning to a test thru the API?

patrickalbaret January 26, 2022

From a Test, I'm able to retrieve the dataset information,

but unfortunatly I don't know how to create a Test issue with a dataset.

 

When I'm doing my POST: https://jiraServer/rest/api/2/issue

 

with the dataset custom field info

 "customfield_16803": {
            "datasetRestBean": { "params": [ {
                        "param": { "id"1, "name""Url",       "rank"0,     "combinatorial"false,
                            "info": {
                                "type""TEXT"
                            }
                        },
                        "values": [
                            {
                                "value""http://prod",
                                "rank"1
                            }
                        ]
                    }
                ]
            }
        },

 I get the error:

{
    "errorMessages": [],
    "errors": {
        "customfield_16803""Field 'customfield_16803' cannot be set. It is not on the appropriate screen, or unknown."
    }
}
How can I create a Test with a dataset?
Thanks for help.

 

2 answers

0 votes
Detlev March 29, 2023

This is my call in java.

The normal creation of an test via rest api works fine but if I insert die customfield for the params than I get the 400.

I have tried some variants of the customfield structure, e.g. with an without the the datasetRestBean tag but nothing works. it returns always the 400.

 

I haven't also find a spezial operation like it exists for adding comments to an issue like "...rest/api/2/issue/<<issueKey>>/comment" to add params to an test issue.

 

JiraConnector_src_Example_1.png

 

JiraConnector_src_Example_2.png

 

Hopefully someone can help me with this problem. Thanks

Detlev March 29, 2023

and this is the answer I get:

 

JiraConnector_src_Example_3.png

0 votes
Detlev March 29, 2023

Dear Patrick,

did you have found a solution for this problem.

At the moment I have the same and have no idea how to solve it.

Unfortunately I can't also find any general documentation for such a problem.

The normal customfield operations do not work in this case or I'm wrong in using it.

 

@atlassian-Support-Team: could you please provide me a desription how to solve this problem?

 

Many thanks

 

Detlev

Suggest an answer

Log in or Sign up to answer