added ability to get, create and update custom select options in custom fields#7
Merged
lesstif merged 4 commits intolesstif:mainfrom Aug 21, 2022
Merged
added ability to get, create and update custom select options in custom fields#7lesstif merged 4 commits intolesstif:mainfrom
lesstif merged 4 commits intolesstif:mainfrom
Conversation
Contributor
Author
|
Had to add another param for |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See lesstif/php-jira-rest-client#465
I have no idea why the official V3 doc does not match what is actually working.... but here we go
I am talking about the fact, that I had to prefix the custom field ID inside the called URL with
customfield_, otherwise it wouldn't work / actually give an error mentioning this problem.So in the end 4 new methods have been added to the Fieldservice:
getCustomFieldContexts()is needed to fetch the available context IDs for a given custom field (needed for all other methods added)getCustomFieldOptions()fetches the currently present options in JIRA including ther ID, disabled state and valuecreateCustomFieldOptions()should be self explanatory - needs the context ID from aboveupdateCustomFieldOptions()as well - needs the context ID from aboveI also noticed, that one can get the
fieldIdandcontextIdfrom the URL when editing the available options in JIRA Cloud:https://yoursubdomain.atlassian.net/secure/admin/EditCustomFieldOptions!default.jspa?atl_token=long-token&fieldConfigSchemeId=10152&fieldConfigId=10152&customFieldId=10048
So the
fieldConfigIdGET Parameter is thecontextIdandcustomFieldIdis thefieldIdThis might be usefull to add to the readme as well because its not really obvious... but let me know what you think