Page 1 of 1

Case Number does not continue after restore

Posted: Tue Jul 12, 2016 4:52 am
by survia
Hi,
On a fresh install of ver 3.0.1.8 we have restored the backup from ver 3.0.1.5. Only one workspace wf_workflow is there.
There were 64 cases already in the backup. After restoring when we create a new case, it starts from case number = 1, whereas we expected it to continue and be 65.
Now we have two cases with same case number as 1.
After restore the document mentions to run the following command
./processmaker migrate-new-cases-lists - however this option "migrate-new-cases-lists" is not there. Not sure if this is anything to do with our issue.

Regards
Suresh

Re: Case Number does not continue after restore

Posted: Tue Jul 12, 2016 5:46 am
by survia
Some posts mentioned about table SEQUENCES which holds the last Case Number. We checked and found it to have the right value (which is 64 in our setup). However new cases does not seem to take next number based on this table. On further analysis found a new table APP_SEQUENCE and looks like it is taking the case number from here. We had set the value in table APP_SEQUENCE to 64 and our new case got ID 65 as expected.

If what we found was correct this could be a problem for whoever restoring backup from earlier versions to 3.0.1.8 where it will start case number from 1 after restore and could potentially cause issues.

We have limited knowledge on the internals of Procesmaker and hence someone who knows better can validate this. That will be very useful for us as well as for others.
Regards
Suresh

Re: Case Number does not continue after restore

Posted: Tue Jul 12, 2016 4:24 pm
by amosbatto
Suresh,
Thanks for noticing this. I have filed a bug report about it. See: http://bugs.processmaker.com/view.php?id=20869
If you have any more comments, please add them there, so the developers will see them.