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

Allow adding custom field with NULL to clear it #48

Merged
merged 2 commits into from
Mar 12, 2023

Conversation

DennisBetawerk
Copy link
Contributor

In the non-cloud version it was/is possible to add a custom field with a value of NULL, so that it would get cleared no matter the type. The type info in the addCustomField function now prevents that, this just adds NULL to that list to allow it again.

@lesstif
Copy link
Owner

lesstif commented Feb 19, 2023

Hi @DennisBetawerk Thank you for your contribution.

Actually, I can't imagine when the admin creates new custom field adds without value.
Could you elaborate a bit more, please?

@DennisBetawerk
Copy link
Contributor Author

@lesstif We use the library to automate submissions from a website into Jira. Sometimes these submissions are updated later on, where some fields are changed to be empty. Our observed behavior with the non-cloud version of the library was that if a field was not present in the request, it would not be modified by Jira. So we pass NULL to ensure the field is emptied, regardless of the type of field.

@lesstif lesstif merged commit ea20fc0 into lesstif:main Mar 12, 2023
lesstif added a commit that referenced this pull request Apr 17, 2023
* 'main' of github.com:lesstif/php-JiraCloud-RESTAPI:
  Apply fixes from StyleCI (#51)
  Update IssueLink.php (#49)
  Allow adding custom field with NULL to clear it (#48)
  Fix how value of cURL's CURLOPT_SSL_VERIFYHOST is determined (#46)

# Conflicts:
#	src/IssueLink/IssueLink.php
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.

2 participants