-
Notifications
You must be signed in to change notification settings - Fork 36
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
🏗️ Improved the HTTP Client implementation on the SM module #221
Merged
Conversation
This file contains 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
1. Replacing the Client interface with 6 methods. 2. Changed the client interface from Client to Connector on the service management approval service.
…e management attachment service.
…e management comment service.
…e management customer service.
…e management feedback service.
…e management info service.
…e management Knowledgebase service.
…e management organization service.
…e management participant service.
…e management queue service.
1. The requestFieldValues object was overwritten map values on the CustomerRequestFields struct methods because the methods that appends fields on the slice of maps is replacing the information on the iteration. 2. This was fixed replacing the Fields struct tag from the CustomerRequestFields (from []map[string]interface{} to map[string]interface{}). 3. With that change, the Fields tag appends the information avoid the overwriting and to send of the information to the consolidation method (*MergeFields*) 4. Some logic was changed on the MergeFields method, removing the mergo iteration and replace it with the creation of the requestFieldValues map. 5. When the requestFieldValues map is created, it's merged with the request struct information. 6. In conclusion, the custom fields are added dynamically and the customer request can be created with multiple form types :).
…e management service_desk service.
…e management service_desk_sla service.
…e management request_type service.
Codecov Report
@@ Coverage Diff @@
## main #221 +/- ##
==========================================
+ Coverage 85.66% 87.30% +1.64%
==========================================
Files 137 137
Lines 11625 11367 -258
==========================================
- Hits 9958 9924 -34
+ Misses 931 724 -207
+ Partials 736 719 -17
|
1. Added the implementation of the HasSetExperimentalFlag method.
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.
Changed the client interface from Client interface to Connector interface on the service management module
🐞 The requestFieldValues object was overwritten map values on the CustomerRequestFields struct methods because the methods that appends fields on the slice of maps is replacing the information on the iteration.
This was fixed replacing the Fields struct tag from the CustomerRequestFields (from []map[string]interface{} to map[string]interface{}).
With that change, the Fields tag appends the information to avoid the overwriting them send the information to the consolidation method (MergeFields)
Some logic was changed on the MergeFields method, removing the mergo iteration and replace it with the creation of the requestFieldValues map.
When the requestFieldValues map is created, it's merged with the request struct information.
In conclusion, the custom fields are added dynamically and the customer request can be created with multiple form types :).