Database concurrency condition detected on testset update via SOAP api

Friday, February 10, 2012
We use SpiraTeam 3.1 at the moment and are experimenting with the SOAP API.

All goes fine, but 1 thing came up:
when performing a TestSet_Update to update the status (from eg not started to "in progress") all is ok.
when doing the same action again to set the status to yet another value we get:
Server raised fault: 'Database concurrency condition detected'

and very consistent. First time no problem, second time always the same error.

Is this a known issue or is there a workaround?

3 Replies
Friday, February 10, 2012
re: FilipBaert Friday, February 10, 2012
This is by design, you need to do a TestSet_RetrieveById first to get the refreshed data then call the TestSet_Update method. This ensures that you don't have outdated data.
Monday, February 13, 2012
re: inflectra.david Friday, February 10, 2012
ok, sounds reasonable, but unfortunately the RetrieveById does not solve the error.

this is the complete message from spirateam:
<s:Envelope xmlns:s=""><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring xml:lang="en-US">Database concurrency condition detected</faultstring><detail><ServiceFaultMessage xmlns="" xmlns:i=""><Message>Database concurrency condition detected</Message><StackTrace>   at Inflectra.SpiraTest.Business.TestSet.Update(TestSetData testSetDataSet, Int32 userId, Nullable`1 intRollbackId)&#xD;
   at Inflectra.SpiraTest.Web.Services.v3_0.ImportExport.TestSet_Update(RemoteTestSet remoteTestSet)</StackTrace><Type>DataAccessConcurrencyException</Type></ServiceFaultMessage></detail></s:Fault></s:Body></s:Envelope>

this is our python code:
  testSetToExecute = getTestSetToExecute(automationHostName)  =>> function gives 1 testset that meets specific filters.
  if(testSetToExecute is not None):
    testCasesToExecute = client.service.TestCase_RetrieveByTestSetId(testSetToExecute.TestSetId)
    testSetToExecute =client.service.TestSet_RetrieveById(testSetToExecute.TestSetId)
    testSetToExecute.TestSetStatusId = 2 #in progress
    testSetToExecute.TestSetStatusName = "In Progress"
    testSetToExecute.ExecutionDate =

the last line fails with given error.

thx for the help

Monday, February 27, 2012
re: FilipBaert Monday, February 13, 2012
Could it be that the LastUpdateDate is not being sent back correctly? That is what's used to verify that the data is current? Also do you have the latest patch for v3.1 applied?

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885


  • Started: Friday, February 10, 2012
  • Last Reply: Monday, February 27, 2012
  • Replies: 3
  • Views: 1980