JiraPS icon indicating copy to clipboard operation
JiraPS copied to clipboard

Jira 9 breaks creating Jira issues

Open gforke97 opened this issue 2 years ago • 19 comments

Description

Get-JiraIssueCreateMetadata fails in Jira Version 9.0 according to a short research its because the used API is deprecreated

Steps To Reproduce

Run Get-JiraIssueCreateMetadata against a Jira Server with Version 9.0 or higher

Expected behavior

Get the Meta Data needed to create an Issue

Your Environment

Jira 9.0

Get-Module JiraPS -ListAvailable | Select Name, Version

Name Version


JiraPS 2.14.6

$PSVersionTable

Name Value


PSVersion 7.2.5 PSEdition Core GitCommitId 7.2.5 OS Microsoft Windows 10.0.22000 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0

Possible Solution

https://bitbucket.org/atlassianlabs/atlascode/issues/753/cannot-open-issue-create-issue-in-vscode

gforke97 avatar Aug 10 '22 16:08 gforke97

Jira Server not cloud btw

gforke97 avatar Aug 10 '22 16:08 gforke97

Same for 9.1. I also discovered that the API call used by Get-JiraIssueCreateMetadata was not only deprecated but missing entirely. I was already making some local changes to use the new API call when I saw your post. The workaround does work after also making changes to the ConvertTo-JiraCreateMetaField for the different structure.

rjl61 avatar Aug 16 '22 06:08 rjl61

I have the same problem! @rjl61 would you please share what changes have you made to solve the problem? It's pretty urgent for me! Thanks!

saeid-adz avatar Sep 12 '22 08:09 saeid-adz

Is there any chance that we will see a solution for this issue? @rjl61: Could you please provide your solution? Thanks.

jcrivas1971 avatar Oct 07 '22 08:10 jcrivas1971

@jcrivas1971 @saeid-adz This is my solution. I have not significantly tested this but it seems to work for my purposes. https://github.com/spicy/JiraPS/commit/fc2632c1f21b3867667197ec2c8e77b266e60e69

spicy avatar Oct 14 '22 20:10 spicy

@spicy Thanks mate! Worked for me too! I have several types of connection and automation based on this module and I can confirm that the issues have been solved by using your solution! Thanks again!

saeid-adz avatar Oct 24 '22 11:10 saeid-adz

@saeid-adz: I am sorry but I guess you have to thank @spicy. @spicy: I will try the solution next week. Thanks in advance for your work.

jcrivas1971 avatar Oct 25 '22 18:10 jcrivas1971

@jcrivas1971 Thanks mate, I selected the wrong userId! edited now :)

saeid-adz avatar Oct 26 '22 07:10 saeid-adz

@spicy: It took a while but I was able to test your fix today. It works perfectly!! Thanks a lot.

jcrivas1971 avatar Nov 29 '22 10:11 jcrivas1971

@spicy I need to integrate this fix today into my local WindowsPowerShell\Modules\JiraPS\2.14.6\JiraPS.psm1, what's the right way to do this? Or can we somehow get a fixed module?

mwoffenden avatar Jan 01 '23 18:01 mwoffenden

@spicy I need to integrate this fix today into my local WindowsPowerShell\Modules\JiraPS\2.14.6\JiraPS.psm1, what's the right way to do this? Or can we somehow get a fixed module?

I don't think this project is being supported since my merge request was not accepted yet. You can just copy my code and modify the function if it's visible. Otherwise you can put the new function in a new ps1 to call instead. Hope this helps

spicy avatar Jan 01 '23 19:01 spicy

You can just copy my code and modify the function if it's visible. Otherwise you can put the new function in a new ps1 to call instead.

@spicy Thanks - I did try that locally, made the edits to "function Get-JiraIssueCreateMetadata" but the error still shows up, so I must be doing something wrong. We (along with many others) very much need this fixed.

Any idea how to build an updated module using your fixed code?

mwoffenden avatar Jan 01 '23 19:01 mwoffenden

Can anyone help with this?

mwoffenden avatar Jan 07 '23 15:01 mwoffenden

@mwoffenden: spicy forked the original project and provided a fixed version. Instead of a local edit you should probably try to use his version or just the corrected file? You could download the whole project as a zip file and either copy the whole directory or just the above mentioned file. Just go to spicy/JIRAPS. I hope this helps.

jcrivas1971 avatar Jan 08 '23 12:01 jcrivas1971

@jcrivas1971 Yes, we finally did download the code and made the edits locally, this solution seems to be working for us. However I can imagine that the ideal is to have the master JiraPS brought up to date so that people downloading from the Powerhsell gallery can have a working version.

mwoffenden avatar Jan 08 '23 17:01 mwoffenden

So what's the status with proper Jira 9 support, @lipkau?

eXpl0it3r avatar Jan 27 '23 14:01 eXpl0it3r

Same issue here. What I can see, this is related to this change: https://confluence.atlassian.com/jiracore/createmeta-rest-endpoint-to-be-removed-975040986.html

We've created a workaround for our use case, and we use this internally. Not sure if this covers all cases and if it is a complete workaround. Anyway, if someone finds that helpful: https://github.com/arcadech/JiraPS/commit/5d2805357475c4564ef013d4a36e497d23f68595

claudiospizzi avatar Nov 13 '23 22:11 claudiospizzi

@claudiospizzi ; thank you so much for this. I hope the maintainers find room to get the CICD pipeline up and running again so your pull-request can get processed. Your change fixed our situation.

ChefkeGremmen avatar Mar 19 '24 07:03 ChefkeGremmen