znuny / ITSMConfigurationManagement

This package implements all ITSM configuration management features. This package requires the ITSMCore package.
1 stars 3 forks source link

Unable to Update Dynamic Fields of Type CONFIG ITEM (DROPDOWN) via REST API #4

Closed smahrl closed 1 week ago

smahrl commented 7 months ago

Environment

Description

When attempting to update Dynamic Fields of type CONFIG ITEM (DROPDOWN) through the REST API, the operation fails with an error message. Tested with TicketUpdate and TicketCreate Endpoints

Error Message

{"Error":{"ErrorCode":"TicketCreate.InvalidParameter","ErrorMessage":"TicketCreate: DynamicField->Value parameter is invalid!"}}

Steps to Reproduce

  1. Attempt to update a ticket's Dynamic Field of type CONFIG ITEM (DROPDOWN) via the REST API.
  2. Use the standard API call format for updating Dynamic Fields.
  3. Observe the error response as shown above. Expected Behavior: The API should successfully update the Dynamic Field of type CONFIG ITEM (DROPDOWN) and return a success response.

Actual Behavior

The API returns an error response indicating an invalid parameter, despite using the correct format for the API call.

rkaldung commented 7 months ago

Do you have an example request that you can post here?

smahrl commented 7 months ago

let me try to give an example: Post Request to /nph-genericinterface.pl/Webservice/GenericTicketConnectorREST/Ticket with following payload: { "Ticket": { "Title": "test", "Queue": "test", "Type": "Incident", "State": "new", "Owner": "email@me.com", "CustomerUser": "email@me.com", "Priority":"3 normal" }, "Article": { "Subject":"Note", "Body": "Text", "ContentType": "text/plain; charset=utf8" }, "DynamicField":[ {"Name":"Link,"Value":'11'} ] }

where 11 would be the config item id

rkaldung commented 7 months ago

Internal issue 37

NiklasSchmitt commented 5 months ago

fixed within the commit ids https://github.com/znuny/ITSMConfigurationManagement/commit/fc1a78c1659cf783311bef5529d196c8237a53ea & https://github.com/znuny/ITSMConfigurationManagement/commit/a99cbb939fcb8f155cff03ad08f4c3d6a5d44b0a