I am creating jira issue from Service now via REST call which was working until yesterday
Suddenly i am getting 'Reporter' is mandatory error.
The user is having permission to modify the Reported for field and create jira issue.
When I make 'reporter' an option field, it is working. But when it is Required, It is not working.
Can anyone provide solution for this?
@Kanhaiya Panigrahi if a field is required you need to pass some value to it, otherwise API will surely give error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
{
"fields":{
"issuetype":{
"name":"Bug"
},
"project":{
"key":"SNOW"
},
"summary":"Issue with creating Jira tickets from ITWorx",
"description":" Issue with creating Jira tickets from ITWorx",
"priority":{
"name":"Low"
},
"customfield_10400":"INC0348345",
"customfield_10401":"https://ptc.service-now.com/incident.do?sys_id=1868e1251343cc100a083ff18144b0d9",
"reporter":{
"name":"Jira User"
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And until yesterday it was working but suddenly it stopped.
I tried with id, name and email too for the reporter but its not working.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Kanhaiya Panigrahi Can you give a copy of exact error message in API response?
Ideally this should work, of field is part create screen in your Jira.
{
"fields": {
...
"reporter": {
"id": <ID_OF_REPORTER>
},
...
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@DPKJ The Key id is not accepted by Jira. Instead of that I tried with email & name.
But its giving me the same error.
{"errorMessages":[],"errors":{"reporter":"Reporter is required."}}
When I made reporter field optional, then Its working but even though the reporter field is not accepting the value, it remains Anonymous.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Kanhaiya Panigrahi and @Marcin_Kujawa
I am not sure what is wrong in your site, after
I was able to make a rest request using CURL, and it worked perfectly fine. Here is sample of that curl request,
curl --request POST \
--url '<SITE_URL>/rest/api/3/issue' \
--user '<EMAIL>:<API_TOKEN>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"fields": {
"project": {
"key": "SP"
},
"summary": "Issue with reporter test #1",
"issuetype": {
"name": "Task"
},
"reporter": {
"id": "<USER_ID>"
},
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "description",
"type": "text"
}
]
}
]
}
}
}'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@DPKJ Now its working for me. Thanks for the solution.
Earlier I thought By ID it measn name before @domainName
But currently I just passed id of the user which I picked from the URL.
{
"fields":{
"issuetype":{
"name":"Bug"
},
"project":{
"key":"SNOW"
},
"summary":"Issue with creating Jira tickets from ITWorx2",
"description":" Issue with creating Jira tickets from ITWorx2",
"priority":{
"name":"Low"
},
"customfield_10400":"INC0348345",
"customfield_10401":"https://ptc.service-now.com/incident.do?sys_id=1868e1251343cc100a083ff18144b0d9",
"reporter":{
"id":"59f6fdf0883e38789b8e1e8f"
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We've had the same issue this week ourselves. We've currently also worked around it by hardcoding an ID but defeats the point of the field.
It has been working for months up until now.
Has something changed in Jira in relation to the Reporter field?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Tom Boyle Yes, GDPR has started kicking in for API's. So using ID field of user is best bet at this time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
how can we user name instead of id to set reporter field is there nay way
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why the hell they have did this change!!!, this has broken my integration, and is IMHO a very bad option when you need to integrate different systems.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
i have similar issues though just in Powershell
Script
$parameters = @{
Project = 'INF'
#customfield_10930 = 'INF-2312'
issueType = 'Task'
Reporter ='kim.kokholm'
Summary = 'Test issue from PowerShell'
Description = "This is a sample issue created by ." }
New-JiraIssue @parameters
error
Invoke-JiraMethod :
reporter
--------
Reporter is required.
At C:\Program Files\WindowsPowerShell\Modules\JiraPS\2.12.5\JiraPS.psm1:3842 char:27
+ if ($result = Invoke-JiraMethod @parameter) {
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidResult: (:) [Invoke-JiraMethod], RuntimeException
+ FullyQualifiedErrorId : InvalidResponse.Status400,Invoke-JiraMethod
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
has anyone figured out 'reporter is required' for PowerShell? I am having same issue. thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Brian McGrath it work for me
I were introduced reporter inside Fields with my customefields as you can see below and get Account ID beforehands from email address
$user = "email@domain.com"
$reporter = (Get-JiraConfigServer -ErrorAction Stop) + "/rest/api/3/user/search?query=" + $user
$accountId = (Invoke-JiraMethod $reporter).accountId # you need to use ID due GDPR
$parameters = @{
Project = "PROJECTNAME"
IssueType = "ISSUETYPE"
Summary = "Test issue from PowerShell XXX"
Fields = @{
customfield_11449 = { value = "option3" }
reporter = @{ "id" = $accountId }
}
}
New-JiraIssue @parameters
References
Solved: How to do user search with v3 REST API? (atlassian.com)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have the same problem. Reporter field has value (username), but I receive 'Repoter is required' exception.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I set Reporter as an optional field and it worked, but it's just workaround, not solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Marcin_Kujawa Thanks for the solution. I have already tried this yesterday and yes it is just a workaround not a permanent solution.
If you find anything permanent solution please post it here too.
Meanwhile I am also investigating & if i get it then will post.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Marcin_Kujawa You can pass the userid, just open the user's profile in JIRA & pick it from the URL.
{
"fields":{
"issuetype":{
"name":"Bug"
},
"project":{
"key":"SNOW"
},
"summary":"Issue with creating Jira tickets from ITWorx2",
"description":" Issue with creating Jira tickets from ITWorx2",
"priority":{
"name":"Low"
},
"customfield_10400":"INC0348345",
"customfield_10401":"https://ptc.service-now.com/incident.do?sys_id=1868e1251343cc100a083ff18144b0d9",
"reporter":{
"id":"59f6fdf0883e38789b8e1e8f"
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you. Maybe it works, but I'm using Atlassian.Jira (.NET nuget package). I have only 'Reporter' field, no Id subfield within it. It seems I have to wait form new version of that library.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Marcin_Kujawa Even I didn't find anything with fieldname 'id'
But If you are able to search the user in people section then open user's profile
then from URL you can pick the id
https://ptc-it.atlassian.net/jira/people/59f6fdf0883e38789b8e1e8f
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Kanhaiya Panigrahi The problem mentioned before, and that I have, is that the Reporter / name subfield is required but Jira refuses to accept any value for 'name'.
I had to make Reporter optional to be able to create new issues. When I retrieve the issue data, the Reporter data is null. If I set a Reporter in Jira UI, and then retrieve the issue again, the Reporter data does not contain a 'name' sub-field.
"created": "2020-03-24T10:00:05.000Z",
"reporter": {
"self": "https://xxx.atlassian.net/rest/api/2/user?accountId=5a964372b81cd2381486a5de",
"emailAddress": "ixxx@gmail.com",
"avatarUrls": {
"48x48": "https://secure.gravatar.com/avatar/1f44eeb2d6cbf38e55721f57f5a72022?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FIL-5.png&size=48&s=48",
"24x24": "https://secure.gravatar.com/avatar/1f44eeb2d6cbf38e55721f57f5a72022?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FIL-5.png&size=24&s=24",
"16x16": "https://secure.gravatar.com/avatar/1f44eeb2d6cbf38e55721f57f5a72022?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FIL-5.png&size=16&s=16",
"32x32": "https://secure.gravatar.com/avatar/1f44eeb2d6cbf38e55721f57f5a72022?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FIL-5.png&size=32&s=32"
},
"displayName": "Joe Bloggs",
"active": true,
"timeZone": "Europe/London",
"accountId": "5a964372b81cd2381486a5de",
"accountType": "atlassian"
},
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually it contain 'id' as a sub field instead of name now.
I highlighted the same below. you can try with this. In the value just pass user's sys id which yo will get from the URL of user's profile.
{
"fields":{
"issuetype":{
"name":"Bug"
},
"project":{
"key":"SNOW"
},
"summary":"Issue with creating Jira tickets from ITWorx2",
"description":" Issue with creating Jira tickets from ITWorx2",
"priority":{
"name":"Low"
},
"customfield_10400":"INC0348345",
"customfield_10401":"https://ptc.service-now.com/incident.do?sys_id=1868e1251343cc100a083ff18144b0d9",
"reporter":{
"id":"59f6fdf0883e38789b8e1e8f"
}
}
}
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.