I'm working on a little project right now and therefor I tried to update the Service Level Agreement (SLA) of a ticket which has no SLA assigned yet, by using PyOTRS, but it didn't work. Getting the Information SLA or SLAID of a Ticket did work with this code:
from pyotrs import Client
client = Client("http://otrs.example.com", "root#localhost", "password")
client.session_create()
myticket = client.ticket_get_by_id("1")
print(myticket.field_get(("SLA")))
But Updating the SLA or SLAID didn't work with the following code (It worked for other attributes like Owner, Responsible, etc.). So my Question is, is it possible to update the SLA/SLAID and if yes, what am I doing wrong?
from pyotrs import Client
client = Client("http://otrs.example.com", "root#localhost", "password")
client.session_create()
myticket = client.ticket_update(1, SLAID="1")
This is the Error Message I get:
OTRS Error Code: TicketUpdate.InvalidParameter
OTRS Error Message: TicketUpdate: Ticket->SLAID or Ticket->SLA parameter is invalid!
We faced the same issue and were able to solve it.
As a precondition, the SLA must be assigned to a Service in OTRS.
Afterwards you have to send SLAID and ServiceID to the system to get a ticket with SLA created.
Related
I just setup dozens of web scenario checks in Zabbix. I also added triggers and one action for all the triggers. To test the action I deployed a test bad web scenario check, however an email message I got from the test only gave very high-level information:
Problem: Service "Jira-QAS" is DOWN
-----------------------------------------------------------------------------
Application: CloudOps
Problem started at 13:41:38 on 2019.11.20
Problem name: Service "Jira-QAS" is DOWN
Severity: High
Status: PROBLEM
Value: 1
Original problem ID: 2314429
-----------------------------------------------------------------------------
I want to parse "Last error message of scenario ..." as a macro and put it in the "default message" in "Action", so it would look something like this:
Problem: Service "Jira-QAS" is DOWN
-----------------------------------------------------------------------------
Application: CloudOps
Problem started at 13:41:38 on 2019.11.20
Problem name: Service "Jira-QAS" is DOWN
Severity: High
Issue: Couldn't connect to server: Failed connect to jira-qas.aws.ca:443; Connection refused
Original problem ID: 2314429
-----------------------------------------------------------------------------
I tried different macros such as {ITEM.VALUE}, {EVENT.STATUS}, but neither of them were good enough.
You need to define Operational Data in the trigger, and add {EVENT.OPDATA} to the mail.
Operational data allow to define arbitrary strings along with macros. The macros will resolve dynamically to real time data in Monitoring → Problems. While macros in the trigger name (see above) will resolve to their values at the moment of a problem happening and will become the basis of a static problem name, the macros in the operational data maintain the ability to display the very latest information dynamically.
The same set of macros is supported as in the trigger name.
https://www.zabbix.com/documentation/current/manual/config/triggers/trigger
I'm following https://cadenceworkflow.io/docs/go-client/workflow-testing/#setup and seeing errors with Activity error. {"WorkflowID": "default-test-workflow-id".
How do I go about setting the WorkflowID (eg so that it contains the test name)? I'm using Go.
It's not supported directly to set a workflowID. we recently realized it and are actively working on this.
At the mean time, if you have to test with workflowID, a workaround is to use
ReplayWorkflowExecution(ctx context.Context, service workflowserviceclient.Interface, logger *zap.Logger, domain string, execution workflow.Execution) error
But you have to mock the service interface for fetching history.
See https://github.com/uber-go/cadence-client/blob/b31c3bbfb06a1f96c6ad911a48237cfbc4f9a565/worker/worker.go#L166
I will update this thread when this feature is implemented.
I am trying to read a spreadsheet using a service account (I cannot use OAuth, which works, since the process will be running on a server to periodically check sheet data)
I tried several approaches. If I follow the example using oauth I can see the sheet values. However, I need the run the script without any GUI on the background.
I have found this tutorial https://github.com/juampynr/google-spreadsheet-reader
I have created a projec, service account, added viewer role, shared the spreadsheet with the service account email. Generated the key.
It seems that the test program can connect to the google services but the moment it request the spreadsheet the end result is "404 not found".
require 'vendor/autoload.php';
$service_account_file = '/secrets/readsheetmar2019-08b737d1c1cb._portfolio_test.json';
$spreadsheet_id = '1TAWybckPrnWlQxBZh0ScDsFOvftwi2dvTBNGarSdY30';
$spreadsheet_range = '';
putenv('GOOGLE_APPLICATION_CREDENTIALS=' . $service_account_file);
$client = new Google_Client();
$client->useApplicationDefaultCredentials();
$client->addScope(Google_Service_Sheets::SPREADSHEETS_READONLY);
$client->fetchAccessTokenWithAssertion();
$service = new Google_Service_Sheets($client);
//added by me
if ($client->isAccessTokenExpired()) {
print "expired\n";
}else{
print "not expired\n";
}
$result = $service->spreadsheets_values->get($spreadsheet_id, $spreadsheet_range);
var_dump($result->getValues());
Error:PHP Fatal error: Uncaught exception 'Google_Service_Exception' with message '
Error 404 (Not Found)!!1
When the access token retrieved by OAuth2 is used, the Spreadsheet of $spreadsheet_id = '1TAWybckPrnWlQxBZh0ScDsFOvftwi2dvTBNGarSdY30'; can retrieve the values.
When the access token retrieved by Service Account is used, Error 404 (Not Found)!!1 is returned.
If my understanding is correct, please confirm the following points.
Confirmation points:
As a test run, please set the range $spreadsheet_range = '';.
For example, it's $spreadsheet_range = 'Sheet1'.
If the error message of The caller does not have permission is returned, please confirm as follows.
Whether the Spreadsheet of 1TAWybckPrnWlQxBZh0ScDsFOvftwi2dvTBNGarSdY30 is sharing the email of Service Account.
If you didn't share the Service Account to the Spreadsheet, please share the email of client_email in the file of readsheetmar2019-08b737d1c1cb._portfolio_test.json to the Spreadsheet you want to access.
If the error message of Google Sheets API has not been used in project ### before or it is disabled. is returned, please enable Sheets API.
If this was not the solution for your issue, I apologize.
We are using Snaplogic to load records into workday. Currently, extracting customer records from the source and trying to load them into workday using the object Put_Customer of web service Revenue_Management.
I was getting the following error:
But I'm not getting any category information from the source. So, I tried putting the value for Customer_Category_Reference as 1. But I ended up getting the following error.
The documentation for workday is not helpful and this has been a blocker for me for some time now.
Any help will be appreciated.
Update:
Trying to get customer categories using the Get_Customer_Categories object of Revenue_Management web service using Snaplogic. But getting the following error:
Failure: Soap fault, Reason: Processing error occurred. The task submitted is not authorized., Resolution: Address SOAP fault message and retry
Unfortunately I don't have access to a tenant at this time to validate . However it is likely to work based in prior experience . Perhaps you could create a customer in Workday, through the GUI. Then do get customer API call. Note the category reference . Then, use that in your put customer call
If you look at the API documentation, you will find that Put_Customer accepts a WID in the Customer_WWS_Data object. If you search for "Customer Categories" in Workday, you will likely find the report of the same name. Just select the category that you want your newly loaded customers to default to (click on the magnifying class, then on the ellipsis, Integration Ids, View Ids). The Workday ID will appear at the top.
I have not used the Revenue Management API, but my code for creating a position reference in the Compensation API is probably very similar to what you need to do for the Customer Category reference:
public static Position_ElementObjectType getPositionReference(string WID) {
return new Position_ElementObjectType {
ID = new Position_ElementObjectIDType[] {
new Position_ElementObjectIDType {
type = "WID",
Value = WID
}
}
};
}
We have consistently getting the following error today when using API V3.0 to retrieve TaxRate from QBO:
An application error has occurred while processing your request - Detail: System Failure Error: An unexpected error occurred while accessing or saving your data. Please wait a few minutes and try again. If the problem persists, contact customer support. - Error Code: 10000
Is this a temporary issue with the servers or has something changed in the API ?
Thanks
I tried both the taxrate endpoints(findById and Query) from ApiExplorer and got a successful response.
GetById - https://qb.sbfinance.intuit.com/v3/company/688779980/taxrate/2
Query - https://qb.sbfinance.intuit.com/v3/company/688779980/query?query=select * from TaxRate
Can you please give it a try from ApiExplorer and check if you are hitting the correct endpoints. Otherwise you can raise a support ticket mentioning your company's relamID.
EDIT
Standard BASE URL for V3 - https://quickbooks.api.intuit.com/v3/company
We get the following when we try this call using devkit -
https://quickbooks.api.intuit.com/v3/company/1119166485/query?query=select+*+from+TaxRate&requestid=faf9f5e207134f24930eef40c9b8a21a&
Thanks
There is a bug in .net devkit where IDSquery will not work for count.
You need to use the following lamda function until the fix is in place-
QueryService AccQueryService2 = new QueryService(context);
int accs22= AccQueryService2.Select(c => c).Count();
Refer:
https://intuitpartnerplatform.lc.intuit.com/questions/829658-how-to-select-count-from-invoice-using-idsquery-to-return-int?jump_to=comment_1941998
EDIT:
The team has identified this a bug. They will rectify this in the next release around 1 month from now.