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

[BUG] PUT https://localhost:8443/api/codeTemplateLibraries?override=true does not work #4473

Open
MichaelLeeHobbs opened this issue Mar 13, 2021 · 0 comments
Labels
enhancement New feature or request Internal-Issue-Created An issue has been created in NextGen's internal issue tracker RS-4984 triaged

Comments

@MichaelLeeHobbs
Copy link

MichaelLeeHobbs commented Mar 13, 2021

Describe the bug
A clear and concise description of what the bug is. Is this consistently reproducible?
PUT https://localhost:8443/api/codeTemplateLibraries?override=true does not work

To Reproduce
Setup steps (if required). Example:

curl -ik -u admin:admin -X PUT "https://localhost:8443/api/codeTemplateLibraries?override=true" -H "accept: application/xml" -H "Content-Type: application/xml" -d "<list> <codeTemplateLibrary version=\"3.10.0\"> <id>7a288be4-3b9d-402e-9c85-f6f47ad1cab5</id> <name>test</name> <revision>1</revision> <lastModified> <time>1615644347812</time> <timezone>Etc/UTC</timezone> </lastModified> <description> </description> <includeNewChannels>false</includeNewChannels> <enabledChannelIds/> <disabledChannelIds> <string>95f283d6-e7e6-4156-9aaf-438b2e8189be</string> <string>cb468b36-426d-4c1c-9e22-28da580f897e</string> <string>3d194c52-0c93-4104-95cb-c4c2baaa8f85</string> <string>ac780bfa-1a27-4d37-ba85-5d57c1a4bfdd</string> <string>52f774ab-a3aa-44cd-93ca-66363d59b10f</string> </disabledChannelIds> <codeTemplates> <codeTemplate version=\"3.10.0\"> <id>8ef73533-c35f-48cc-8361-efa200fe410b</id> <name>test</name> <revision>1</revision> <lastModified> <time>1615644347878</time> <timezone>Etc/UTC</timezone> </lastModified> <contextSet> <delegate> <contextType>DESTINATION_RESPONSE_TRANSFORMER</contextType> <contextType>DESTINATION_DISPATCHER</contextType> <contextType>DESTINATION_FILTER_TRANSFORMER</contextType> <contextType>SOURCE_FILTER_TRANSFORMER</contextType> <contextType>SOURCE_RECEIVER</contextType> </delegate> </contextSet> <properties class=\"com.mirth.connect.model.codetemplates.BasicCodeTemplateProperties\"> <type>FUNCTION</type> <code>function getLogger() {\treturn {\t\tinfo: (msg) =&gt; logger.info(channelName + &apos;: &apos; + msg),\t\terror: (msg) =&gt; logger.error(channelName + &apos;: &apos; + msg),\t}}</code> </properties> </codeTemplate> </codeTemplates> </codeTemplateLibrary></list>"

Expected behavior
A clear and concise description of what you expected to happen.
Code templates to be replaced.

Actual behavior
A clear and concise description of what actually happens.
Code templates are not replaced but get a http status code 200 as if the operation was successful.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • 3.10 container

Workaround(s)
Are there one or more workarounds for this issue currently? none

Additional context
Add any other context about the problem here.

Edit:
After digging into this I found that PUT /codeTemplateLibraries calls updateCodeTemplateLibraries which only updates the libraries and not the actual templates. Where as POST /codeTemplateLibraries/_bulkUpdate calls updateLibrariesAndTemplates which first updates the templates and then calls updateLibrariesAndTemplates. The POST /codeTemplateLibraries/_bulkUpdate is overly complex and has no useable examples and likely no one even uses (IMO). It would be very useful if the simple replace all PUT /codeTemplateLibraries could be fixed.

@MichaelLeeHobbs MichaelLeeHobbs added the bug Something isn't working label Mar 13, 2021
@cturczynskyj cturczynskyj added enhancement New feature or request Internal-Issue-Created An issue has been created in NextGen's internal issue tracker RS-4984 triaged and removed bug Something isn't working labels Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Internal-Issue-Created An issue has been created in NextGen's internal issue tracker RS-4984 triaged
Projects
None yet
Development

No branches or pull requests

2 participants