I've recently set up a Jira Software Server and created test cases using REST API automation.
I need to set the Owner inside of the test cases but with no avail. The following
error message was the result:
{
"errorMessages": [ "The user _ was not found for field owner."]
}
Hello @sthumulati ,
I believe this question was mistakenly created under the Jira Automation section, while I believe it is about the TM4J - Test Management for Jira add-on:
Therefore I have moved it to the Marketplace Apps and Integrations section. I have also added the proper tag so that there are higher chances to get a reply form TM4J team.
However, looking at the error message, it looks like you are trying to set the user '_' as the owner for your test case and this user was not found.
Can you kindly let us know which value are you passing in order to set the owner?
Cheers,
Dario
Hi,
I have a project lead name Ashwin Thumulati.
I am unable to set the owner to the default lead.
So, the error message is actually...
{
"errorMessages": [ "The user Ashwin Thumulati was not found for field owner."]
}
RestAssured Output:
Request method: POST
Request URI: http://localhost:8080/rest/atm/1.0/testcase
Proxy: <none>
Request params: <none>
Query params: <none>
Form params: <none>
Path params: <none>
Headers: Authorization=Basic c3RodW11bGF0aTpQb2x5IW1hdGg0MjA=
Accept=application/json, text/plain, */**
Accept-Encodng=gzip, deflate
Content-Type=application/json
Cookies: <none>
Multiparts: <none>
Body:
{
"projectKey": "DT",
"name": "DT-103",
"objective": "Testing Jira REST API",
"precondition": "Planned Test",
"folder": "/Prototype",
"status": "Approved",
"priority": "Low",
"component": "Prototype",
"owner": "_",
"estimatedTime": 26602284,
"labels": [
"UI",
"API"
],
"issueLinks": [
"DT-1"
],
"customFields": {
"Misc": "Etc"
},
"testScript": {
"type": "STEP_BY_STEP",
"steps": [
{
"description": "description",
"testData": "testData",
"expectedResult": "expectedResult"
}
]
}
}
{
"errorMessages": [
"The user Ashwin Thumulati was not found for field owner."
]
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there Jira Software Server setting I could use to activate reader Owner?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @sthumulati ,
Before going any further, can you confirm the username is "_" and that the user has proper rights to be assigned as the owner?
You can check this by sending a GET request to the below endpoint:
http://localhost:8080/jira/rest/api/2/user?username=_
If this does not help then I would advise to get in touch with the vendor by using the resources listed in the support tab of the marketplace page for the app:
Contact
- Mon - Fri 4:00AM - 5:00PM EDT
- Submit a support request
- Go to vendor status page
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Request method: GET
Request URI: http://localhost:8080/rest/api/2/user?username=sthumulati
Proxy: <none>
Request params: <none>
Query params: <none>
Form params: <none>
Path params: <none>
Headers: Authorization=Basic c3RodW11bGF0aTpQb2x5IW1hdGg0MjA=
Accept=application/json, text/plain, */**
Accept-Encodng=gzip, deflate
Content-Type=application/json
Cookies: <none>
Multiparts: <none>
Body: <none>
{
"self": "http://localhost:8080/rest/api/2/user?username=sthumulati",
"key": "JIRAUSER10000",
"name": "sthumulati",
"emailAddress": "sthumulati@gmail.com",
"avatarUrls": {
"48x48": "http://localhost:8080/secure/useravatar?avatarId=10349",
"24x24": "http://localhost:8080/secure/useravatar?size=small&avatarId=10349",
"16x16": "http://localhost:8080/secure/useravatar?size=xsmall&avatarId=10349",
"32x32": "http://localhost:8080/secure/useravatar?size=medium&avatarId=10349"
},
"displayName": "Ashwin Thumulati",
"active": true,
"deleted": false,
"timeZone": "America/Chicago",
"locale": "en_US",
"groups": {
"size": 2,
"items": [
]
},
"applicationRoles": {
"size": 1,
"items": [
]
},
"expand": "groups,applicationRoles"
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dario,
I ran the GET call and above is the result.
But I'm unable to interpret. Please reply. Thanks.
-Ashwin Thumulati
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @sthumulati ,
In the example you provided earlier, you were trying to set the owner of the test to the user _
"owner": "_",
Now you are providing the details of the user sthumulati:
Request URI: http://localhost:8080/rest/api/2/user?username=sthumulati
So, I am not 100% sure I understand what you are doing here, but:
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.