Fix Depricated Search Endpoint
Description
Fix almost unusable function Get-JiraIssue After last jira api updtate Issue: https://github.com/AtlassianPS/JiraPS/issues/535
Motivation and Context
Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
- [X] My code follows the code style of this project.
- [X] I have added Pester Tests that describe what my changes should do. (Not necessary)
- [X] I have updated the documentation accordingly. (Not necessary)
@GamerClassN7 This definitely needs fixing but is this the right fix?
The error in https://github.com/AtlassianPS/JiraPS/issues/535 talks about migrating to the v3 endpoint, so I'd be expecting to see this change from v2 to v3
https://github.com/AtlassianPS/JiraPS/blob/339b93e8239c51780bf9ad864cbdf885b67f701c/JiraPS/Public/Get-JiraIssue.ps1#L99
@GamerClassN7 This definitely needs fixing but is this the right fix?
The error in #535 talks about migrating to the v3 endpoint, so I'd be expecting to see this change from v2 to v3
https://github.com/AtlassianPS/JiraPS/blob/339b93e8239c51780bf9ad864cbdf885b67f701c/JiraPS/Public/Get-JiraIssue.ps1#L99
Yes it is i was not able to make it work under api v3 with my fix it seems to work correctly even pagination etc.
@GamerClassN7 This definitely needs fixing but is this the right fix? The error in #535 talks about migrating to the v3 endpoint, so I'd be expecting to see this change from v2 to v3 https://github.com/AtlassianPS/JiraPS/blob/339b93e8239c51780bf9ad864cbdf885b67f701c/JiraPS/Public/Get-JiraIssue.ps1#L99
Yes it is i was not able to make it work under api v3 with my fix it seems to work correctly even pagination etc.
Pagination need some work it is not as reliable a observed first time
@harryjohn-dev made some changes acording to documentation
Thank you for your contribution! 🙌
The pagination logic was already not trivial in the past, but have 2 definitely makes it more complicated. My first instinct is to refactor so that we extract them into dedicated private functions.
This would also make it easier to test.
Thank you for your contribution! 🙌
The pagination logic was already not trivial in the past, but have 2 definitely makes it more complicated. My first instinct is to refactor so that we extract them into dedicated private functions.
This would also make it easier to test.
I am afraid i am not so silled in souch Architecture, i wass happy i can help with problem, and found the solution but i am araid that i no able to fufill your request without help :/ Feel free to message me on discord :) i am in your server now :)
Problem is that this function affect many companies worl wide so maybe as common groud would be possible to make some beta release and get them working and then do the refactoring as you sugested ? :)
Probably related Add-JiraIssueWorklog no loger is able to inser worklog item.
Invoke-JiraMethod: Obsah pracovnĂho protokolu nenĂ platnĂ˝.
Invoke-JiraMethod: Zápis práce nesmà být null.
Invoke-JiraMethod: worklog ------- INVALID_INPUT
$issue | Add-JiraIssueWorklog -Comment '{ "version": 1, "type": "doc", "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "Hello " }, { "type": "text", "text": "world", "marks": [ { "type": "strong" } ] } ] } ] }' -TimeSpent $spendTime -DateStarted $startTime
coments need to be submited in nev format there should be -comment and -commentRaw for this purpose
Also there is soem changes to comment system in general comment in worklogs now return @{type=doc; version=1; content=System.Object[]} instead of comments.