I'm using p4api 2018.1. Issuing a p4 tickets from the Run method, the output message from stdout says: "Must upgrade to 2004.2 p4 to access tickets."
This doesn't sound like an upgrade to me.
I tried it with this code.
int errNo;
ClientUser ui;
ClientApi client;
Error err;
client.DefinePort(myport, &err);
client.DefineClient(myclient, &err);
client.Init(&err);
client.Run("tickets", &ui);
errNo = client.Final(&err);
myport and myclient are string values that have valid port and client values. They've been successfully tested on other commands as well.
What I was expecting was a list of my current tickets to be displayed from stdout.
p4 ticketsisn't a server command that you can access via the API, it's implemented directly in the P4 CLI (bypassing the usualclient.Run()call). If you actually send theticketscommand to the server, the server tells you to upgrade your client because it assumes that a newer client would know thatticketsisn't a real command.If you want to implement functionality similar to
p4 ticketsin your app, take a look at theclientTicketsfunction inclientmain.cc:https://workshop.perforce.com/files/guest/perforce_software/p4/2018-2/client/clientmain.cc#936