Task #2591
Enable correct document comparison when o-url and section hierarchy is the same for two different documents
100%
Description
When we overwrote Python Howtos DT book with the same zip file, we did not expect any tba or tbr files. However, we did.
The reason was because multiple documents had the same o-url and section hierarchy in this book.
One of the l-urls in the tbr file was 10114/prd/3/howto/clinic-Changing-and-redirecting-Clinics-output-335.html :
Rank of this l-url is 344. when comparing the new version and old version, we compare it by section hierarchy and url. There is also another document(with rank 333) having same o-url and section hierarchy as document 344.
i.e Python HOWTOs >> Argument Clinic How-To >> Advanced Topics >> Changing and redirecting Clinic’s output >> two-pass
document 344 - https://edutestqa.appspot.com/admin/document/10114/prd/3/howto/clinic-Changing-and-redirecting-Clinics-output-335.html
document 333 - https://edutestqa.appspot.com/admin/document/10114/prd/3/howto/clinic-Changing-and-redirecting-Clinics-output-324.html
As both documents have the same url and section hierarchy, code returns documentId of 333 when comparing the versions of 344. So it was trying to remove 333 instead of 344 in tbr. That's the reason why document 344(10114/prd/3/howto/clinic-Changing-and-redirecting-Clinics-output-335.html) is present in the tbr.
This needs a solution.
Updated by Ayush Khandelwal over 2 years ago
- Due date set to 08/23/2022
- Assignee changed from Ayush Khandelwal to Venmuhilan B
- Estimated time set to 3.00 h
Solution:
If we get more than 1 document then compare cnh of all the documents upto 240 characters and get the exact match document.
Updated by Venmuhilan B over 2 years ago
- Status changed from In Progress to Resolved
- % Done changed from 90 to 100
Updated by Venmuhilan B over 2 years ago
- Status changed from Resolved to Reopened
- % Done changed from 100 to 50
Updated by Venmuhilan B over 2 years ago
- Status changed from In Progress to Resolved
- % Done changed from 50 to 100
Updated by Venmuhilan B over 2 years ago
- Status changed from Resolved to Feedback
- Assignee changed from Venmuhilan B to Ayush Khandelwal
Updated by Ayush Khandelwal about 2 years ago
- Status changed from Feedback to Reopened
- Assignee changed from Ayush Khandelwal to Venmuhilan B
- % Done changed from 100 to 50
If we don't found 'cnh' field while comparison of the documents then we will compare 'heading' field without the html content.
Updated by Venmuhilan B about 2 years ago
- Status changed from In Progress to Resolved
- % Done changed from 50 to 100
Updated by Venmuhilan B about 2 years ago
- Assignee changed from Venmuhilan B to Ayush Khandelwal
Updated by Venmuhilan B about 2 years ago
Test case:
Test 1. If the section hierarchy and o-url of new version didn't find the matching document in old version
- returns null(because the document is not found or the new version has a new document that is not present in the old version)
- lurl of the document added to the TBA.
Test 2. If the section hierarchy and o-url of new version is similar to two or more documents of old version then compare their cnh and returns the right documentId.
Test 3. If the section hierarchy and o-url of new version is similar to only one document of old version then don't compare their cnh and return the documentId
Test 4. Some documents will not have cnh property(ex: Table of Contents). In that case, compare the headings of oldversion and new version and return the right documentId.
Updated by Ayush Khandelwal about 2 years ago
- Assignee changed from Ayush Khandelwal to Ram Kordale
Working as expected on QA