Hi, we are working on a project that requires us to create tickets to a ticketing Domain via Automation scripts.
We can observe that the tickets are successfully created as we can navigate to the created tickets themselves:
However we noticed that for some reason those tickets are not listed in the overview page.
We continued creating more tickets via the automation script with different values for the "State" field and that resulted in Error 500 being reported:
Refreshing the page sometimes resulted in different messages in Developer Console:
We do not see any errors in the SLTicketingManager.txt.
We are seeking some guidance on how we can go about troubleshooting such an issue.
Yes, I left out that key piece of information.
I observed this 10.2.4 first. I then tested it on another test DMA which was running 10.1.11 and observed the similar behavior.
I can confirm that C:/Skyline DataMiner/Webpages/API/web.config ‘customErrors mode’ is set to ‘Off’.
Update: I placed the script on another DMA running 10.1.0.0 and I’m seeing the behavior whereby tickets created by the automation script are not shown in the Domain overview page. No Error 500 though.
FYI: The script was developed and tested on DMA 10.0.4. In this DMA version the tickets created by the automation script is shown in the Domain overview page.
Hi Bing,
After looking at your script I noticed that you are creating tickets in the wrong way. You should add a value for the State field in the following way:
ticket.CustomTicketFields["State"] = new GenericEnumEntry<int>(){Name = "New", Value = 1};
The way it was in your script will assign the value '1' to the state:
ticket.CustomTicketFields["State"] = TicketState.Open;
This causes the Elasticsearch mappings to define the State field as type 'long', causing the 500 error after creating tickets through the UI with a string value.
You can solve this by deleting the Elasticsearch index that contains this wrong type and restarting the DMA. You should see that the 500 error will be gone after that. After creating a ticket through the UI or with the automation script with the fix, the mappings should be fine and everything should work again.
On the following page in the DataMiner documentation (at the bottom) you can find an example of how to create a ticket with an automation script: https://docs.dataminer.services/user-guide/Advanced_Modules/Ticketing/Using_the_Ticketing_Gateway_API/Creating_tickets_with_the_Ticketing_Gateway_API.html
Hi Bing, on what version is this?