Book a Demo

Author Topic: Package Flags and CheckedOutTo  (Read 5293 times)

Dieter Goetz

  • EA User
  • **
  • Posts: 43
  • Karma: +0/-1
    • View Profile
Package Flags and CheckedOutTo
« on: September 05, 2016, 05:05:06 pm »
I try to change the package flags within an Add-In. Deleting the CheckedOutTo flag is working. But adding the CheckedOutTo flag ends in an exception.

Actually in both cases the same
string flags = package.flags;
flags = // manipulate flags, add or delete CheckedOutTo
package.flags = flags;
package.Update();

Do you have any ideas how I can add the CheckedOutTo Flag without using the method VersionControlCheckout().

Dieter

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Package Flags and CheckedOutTo
« Reply #1 on: September 05, 2016, 06:34:04 pm »
I don't know why you would want to do that, but probably the only way in this case is to use a direct SQL.

q.

Dieter Goetz

  • EA User
  • **
  • Posts: 43
  • Karma: +0/-1
    • View Profile
Re: Package Flags and CheckedOutTo
« Reply #2 on: September 05, 2016, 09:32:45 pm »
Ups - updating the database with a SQL query. I would prefer the API for this.
Actually I want to replace the VersionControl features from the API with own ones. That is why I want to do this.

Dieter

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Package Flags and CheckedOutTo
« Reply #3 on: September 05, 2016, 10:39:57 pm »
I currently don't have a VC installed, so testing is not easily possible for me. But you could look into the repo with a query (or the API) what the package flags contain before and after a checkout. If you found that you can try setting the Flags via API. If that does not go through (EA might put its hands on the values before passing them to the DB) you would need the SQL. If you did not find the settings I might have a look these days.

q.

Dieter Goetz

  • EA User
  • **
  • Posts: 43
  • Karma: +0/-1
    • View Profile
Re: Package Flags and CheckedOutTo
« Reply #4 on: September 06, 2016, 05:20:16 pm »
I compared t_package of the package before and after check out. Only the package flags are changed.
It works if the flags are changed to a checked in package - even without the CRC. But the Update() method throws an exception if the flags are changed to a checked out package.
GetLastError() returns only "". Not so much information.

I will try to use a direct SQL.

Dieter