Skip to content

Conversation

@GamerClassN7
Copy link

Description

Fix almost unusable function Get-JiraIssue After last jira api updtate
Issue: #535

Motivation and Context

Types of changes

  • 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

  • My code follows the code style of this project.
  • I have added Pester Tests that describe what my changes should do. (Not necessary)
  • I have updated the documentation accordingly. (Not necessary)

lipkau and others added 8 commits June 13, 2024 17:07
* Update Get-JiraIssueCreateMetadata.ps1

https://confluence.atlassian.com/jiracore/createmeta-rest-endpoint-to-be-removed-975040986.html

* Update ConvertTo-JiraCreateMetaField.ps1

https://confluence.atlassian.com/jiracore/createmeta-rest-endpoint-to-be-removed-975040986.html

* Update Get-JiraIssueCreateMetadata.ps1

https://confluence.atlassian.com/jiracore/createmeta-rest-endpoint-to-be-removed-975040986.html

* Update ConvertTo-JiraCreateMetaField.Unit.Tests.ps1

Altered test data to match what is returned by new createmeta call.
…ssianPS#483)

Co-authored-by: Michele Liberman <mliberman@smartcommunications.com>
… quantities of fields (AtlassianPS#516)

* Refactor Set-JiraIssue to only call Get-JiraField once

* Reduce log-spam and add explicit debug message before calling Get-JiraField

* Refactor New-JiraIssue to only call Get-JiraField once

* Re-add missing variable declarations

* Reunify parameter formatting in logs

* Fix New-JiraIssue unit tests

* Add mock for Get-JiraField

* Remove unnecessary mock

---------

Co-authored-by: hmmwhatsthisdo <2093321+hmmwhatsthisdo@users.noreply.github.com>
AtlassianPS#522)

* Add `-Labels` --> `-Label` alias to `Set-JiraIssue`

* Rename+alias `-Labels` to `-Label` in `New-JiraIssue`

* Update docs

* Update unit tests

---------

Co-authored-by: hmmwhatsthisdo <2093321+hmmwhatsthisdo@users.noreply.github.com>
@GamerClassN7 GamerClassN7 requested a review from a team as a code owner September 5, 2025 07:02
@harryjohn-dev
Copy link

harryjohn-dev commented Sep 5, 2025

@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

$searchURi = "$server/rest/api/2/search"

@GamerClassN7
Copy link
Author

@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

$searchURi = "$server/rest/api/2/search"

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
Copy link
Author

@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

$searchURi = "$server/rest/api/2/search"

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

@GamerClassN7
Copy link
Author

@harryjohn-dev made some changes acording to documentation

@lipkau
Copy link
Member

lipkau commented Sep 9, 2025

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.

@GamerClassN7
Copy link
Author

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 :)

@GamerClassN7
Copy link
Author

GamerClassN7 commented Sep 9, 2025

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 ? :)

@GamerClassN7
Copy link
Author

GamerClassN7 commented Sep 16, 2025

Probably related Add-JiraIssueWorklog no loger is able to inser worklog item.
image

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

@GamerClassN7
Copy link
Author

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.

lipkau and others added 12 commits November 30, 2025 22:38
…tegy

- Fix release workflow: correct asset name (PSIni.zip → JiraPS.zip)
- Replace deprecated GitHub Actions with softprops/action-gh-release@v2
- Add automatic prerelease detection for alpha/beta/rc tags
- Update documentation to reflect master-only branch strategy
- Remove all references to develop branch workflow
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 9 to 11.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](dawidd6/action-download-artifact@v9...v11)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-version: '11'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [MatteoCampinoti94/changelog-to-release](https://github.com/matteocampinoti94/changelog-to-release) from 1.0.0 to 1.0.6.
- [Release notes](https://github.com/matteocampinoti94/changelog-to-release/releases)
- [Changelog](https://github.com/MatteoCampinoti94/changelog-to-release/blob/main/CHANGELOG.md)
- [Commits](MatteoCampinoti94/changelog-to-release@v1.0.0...v1.0.6)

---
updated-dependencies:
- dependency-name: MatteoCampinoti94/changelog-to-release
  dependency-version: 1.0.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Also serves as initial basis for how test files may need to be
reformatted.
Tried to preserve the original structure of the tests as much as
possible while converting it to v5 compatibility.
lipkau and others added 29 commits December 16, 2025 12:54
…_actions/MatteoCampinoti94/changelog-to-release-1.0.6

⬆️ Bump MatteoCampinoti94/changelog-to-release from 1.0.0 to 1.0.6
…_actions/dawidd6/action-download-artifact-11

⬆️ Bump dawidd6/action-download-artifact from 9 to 11
…_actions/actions/checkout-6

⬆️ Bump actions/checkout from 4 to 6
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v5...v6)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…_actions/actions/download-artifact-6

⬆️ Bump actions/download-artifact from 5 to 6
…_actions/actions/upload-artifact-5

⬆️ Bump actions/upload-artifact from 4 to 5
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@v4...v5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…_actions/actions/cache-5

⬆️ Bump actions/cache from 4 to 5
Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 11 to 12.
- [Release notes](https://github.com/dawidd6/action-download-artifact/releases)
- [Commits](dawidd6/action-download-artifact@v11...v12)

---
updated-dependencies:
- dependency-name: dawidd6/action-download-artifact
  dependency-version: '12'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…_actions/dawidd6/action-download-artifact-12

⬆️ Bump dawidd6/action-download-artifact from 11 to 12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants