This is a known issue with HP, and I have posted the link below to the KM article that contains a solution for the issue.
The KM article states the following:
ALM is checking out first version of VC entities like tests, reqs, test resources, etc. instead of latest one.
td.test set TS_VC_VERSION_NUMBER sdfasdfadsBy using a query like the following we are able to determine what is the latest check-in version of an entity: i.e. test plan tests.
SELECT TS_TEST_ID, TS_VC_VERSION_NUMBER, TS_VC_STATUS FROM TEST
For example: If wrong value is shown under TS_VC_VERSION_NUMBER (i.e. 1 instead of 5) ALM will check-out version number '1' which is not the latest one!
VC entities like Reqs, Test Resources, etc might also be affected by this so the query should be modified to accomodate to specific entity table.
max(TS_VC_VERSION_NUMBER) from td.HIST_TEST table is not matching TS_VC_VERSION_NUMBER as set on td.TEST table.
**Fix For Tests:**
UPDATE td.TEST SET TS_VC_VERSION_NUMBER = (SELECT MAX(TS_VC_VERSION_NUMBER) FROM td.HIST_TEST WHERE test.TS_TEST_ID=HIST_TEST.TS_TEST_ID) WHERE TS_VC_STATUS = 'Checked_In'
**Fix For Requirements:**
UPDATE td.REQ SET RQ_VC_VERSION_NUMBER = (SELECT MAX(RQ_VC_VERSION_NUMBER) FROM td.HIST_REQ WHERE REQ.RQ_REQ_ID=HIST_REQ.RQ_REQ_ID) WHERE RQ_VC_STATUS = 'Checked_In'
For any other affected entity/table make use of the above queries as template and modify accordingly.
The link to the KM article:
**Note:** The query will only update the tests, requirements, etc. where the VC_STATUS = 'Checked_In'. If you have any items checked by your users, you will need to contact them and let them know that all tests, requirements, etc. need to be checked in. If for some reason not all items are checked in, you can undo the checkout to ensure all items are checked back in. The TDAdmin user can undo a checkout, but you need to be aware that the changes that were created during that check out will be lost and the entity will be reverted back to the previous state before the check out.
If you have the userid for the user who has a checked out entity, and you are using QC Authentication (and not LDAP) and need to keep the changes, then you can change the password for the user within the Site Admin>Site Users tab and then log in as that user and ''check in'' the entity to preserve the changes. This only works with QC Authentication.