Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New-JiraIssue and Set-JiraIssue should use CreateMeta and EditMeta API endpoints for issue/field schematic info #519

Open
hmmwhatsthisdo opened this issue Aug 14, 2024 · 0 comments

Comments

@hmmwhatsthisdo
Copy link
Contributor

hmmwhatsthisdo commented Aug 14, 2024

Context

Is your feature request related to a problem? Please describe.

Currently, Jira supports defining multiple custom fields with the same (user-visible) name. When querying Jira's fields API, it's impossible to know which instance of a duplicate-name field corresponds to the user's intended field selection.

Jira's CreateMeta and EditMeta endpoints are scoped to individual projects/issue[type]s and clearly indicate which fields are available in a given context. These endpoints mean there's no chance for duplicate-name fields to introduce ambiguity.

Description

Describe the solution you'd like

Replace calls to Get-JiraField with data from calls to Get-JiraIssueCreateMetadata (already present) or Get-JiraIssueEditMetaData

Additional Information

New-JiraIssue already calls Get-JiraIssueCreateMetadata, but only uses the information from this call for asserting required fields. We could build upon this to also extract the ID <-> Name map of available fields instead of calling Get-JiraField (or at least try using the *Meta endpoints before falling back)

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

No branches or pull requests

1 participant