Sorry for the question,but i'm losing myself into the web; i'm trying to create script to create subtask on existing story with
New-JiraIssue -IssueType "sub-task" -Parent "ITRS-9786" -Project "ITRS" -Summary "test" -Verbose -Credential $cred
but it fails with
No metadata found for project ITRS and issueType sub-task
What is wrong?
Regards
Welcome to the Atlassian Community!
What script language or library are you using there?
How are you getting the API token and using it to log in? I ask because a "no metadata found" error is either
Hi Nic, thank you for your reply
I'm using ps 5.1 and the module is the last one available installing following official guide
The Project "ITRS" was choose using the attribute Key given from comand
Get-Jiraproject -Credential $cred
Via web interface I can create sub-task on Story "ITRS-9786"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
PS C:\Windows\System32\WindowsPowerShell\v1.0> New-JiraIssue -IssueType sub-task -Parent ITRS-9786 -Project ITRS -Summary "test" -Verbose -Credential $cred
DETTAGLIATO: [New-JiraIssue] Function started
DETTAGLIATO: [Get-JiraConfigServer] Function started
DETTAGLIATO: [Get-JiraConfigServer] Complete
DETTAGLIATO: [Get-JiraIssueCreateMetadata] Function started
DETTAGLIATO: [Get-JiraConfigServer] Function started
DETTAGLIATO: [Get-JiraConfigServer] Complete
DETTAGLIATO: [Get-JiraProject] Function started
DETTAGLIATO: [Get-JiraConfigServer] Function started
DETTAGLIATO: [Get-JiraConfigServer] Complete
DETTAGLIATO: [Get-JiraProject] Processing [ITRS]
DETTAGLIATO: [Invoke-JiraMethod] Function started
DETTAGLIATO: [ConvertTo-GetParameter] Making HTTP get parameter string out of a hashtable
DETTAGLIATO:
Name Value
---- -----
expand description,lead,issueTypes,url,projectKeys
maxResults 25
DETTAGLIATO: [Invoke-JiraMethod] Get http://jira.i***/rest/api/2/project/ITRS?expand=description,lead,issueTypes,url,projectKeys&maxResults=25
DETTAGLIATO: [Test-ServerResponse] Checking response headers for authentication errors
DETTAGLIATO: [Invoke-JiraMethod] Status code: 200
DETTAGLIATO: [Invoke-JiraMethod] Function ended
DETTAGLIATO: [Get-JiraProject] Complete
DETTAGLIATO: [Invoke-JiraMethod] Function started
DETTAGLIATO: [ConvertTo-GetParameter] Making HTTP get parameter string out of a hashtable
DETTAGLIATO:
Name Value
---- -----
issuetypeIds 10101
maxResults 25
expand projects.issuetypes.fields
projectIds 10604
DETTAGLIATO: [Invoke-JiraMethod] Get http://jira.***/rest/api/2/issue/createmeta?issuetypeIds=10101&maxResults=25&expand=projects.issuetypes.fields&projectIds=10604
DETTAGLIATO: [Invoke-JiraMethod] Failed to get an answer from the server
DETTAGLIATO: [Test-ServerResponse] Checking response headers for authentication errors
DETTAGLIATO: [Invoke-JiraMethod] Status code: InternalServerError
DETTAGLIATO: [Resolve-ErrorWebResponse] Function started
DETTAGLIATO: [Resolve-ErrorWebResponse] Retrieved body of HTTP response for more information about the error ($responseBody)
DETTAGLIATO: [Resolve-ErrorWebResponse] Function ended
DETTAGLIATO: [Invoke-JiraMethod] Function ended
No metadata found for project ITRS and issueType sub-task.
In C:\Program Files\WindowsPowerShell\Modules\JiraPS\2.14.6\JiraPS.psm1:2058 car:13
+ Throw $errorItem
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (ITRS:String) [], ArgumentException
+ FullyQualifiedErrorId : IssueMetadata.ObjectNotFound
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That doesn't tell us what the library is, but the logs seem to say you got in ok, ran a search and found nothing. Your user can't see the project basically. The code is calling a "createmeta" function which essentially says "Tell me what data you need to create an issue in this project" and the response is "you can't see that"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is providing the New-JiraIssue command you are running here? It uses a library to access Jira somehow
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.