question

danielmoreno-1 avatar image
danielmoreno-1 asked

UpdateTask doesn't work propperly

Hi,

I was working on a full environment migration tool (using Unity/C# SDK) and I'm having problems with the management of the Scheduled Tasks. When uploading new tasks to an environment there's no error from PlayFab, but after that, I dont see how to update or change those ones.

The flow goes as follows:

-Try to UpdateTask > PlayFabErrorCode.TaskNotFound > CreateTask(Action or CS type) > Get PlayFab Error: ScheduledTaskNameConflict - A scheduled task with the same name already exists.

So basically it doesn't let me update nor create a task whose Id is already taken.

If you need more details, I can be more specific. But playing a bit with Postman is really easy to break the tasks.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
1807605288 avatar image
1807605288 answered

When you copy from one title to another, set the "Identifier" field to null.

Name is unique within your title. Identifier is unique within all of PlayFab.

In Postman, just omit it from the request entirely.

3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

pfnathan avatar image pfnathan ♦ commented ·

Can you let us know your TitleID please, we would like to take a peek as well, also, please share your JSON result from Postman as well.

0 Likes 0 ·
danielmoreno-1 avatar image danielmoreno-1 pfnathan ♦ commented ·

So... something weird is happening now. I just saw that there were no scheduled tasks on the environment (honestly I dont remember deleting them all, but could be the case). I tried to add new task through the dashboard to get the JSON result, but it wont let me. Either I get a playfab error or after clicking save the list is empty.

The TitleId for this environment is 988C. I will leave it as it is until you can check it.

0 Likes 0 ·
pfnathan avatar image pfnathan ♦ pfnathan ♦ commented ·

Apologie for the late reply. This is just working as intended.

If you are trying to create a scheduled task with the same name, this is just how it works since they are authoritative IDs. Basically, you cannot create a task with the same name; this is by design

For the pretty much most things are authoritative IDs, our rules won't let you duplicate

For example; the name will be "RuleName" and then "RuleName(1)"

Note that when you try to duplicate it, handled errors like this are always intended

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.