Skip to content

Conversation

ritankarsaha
Copy link
Contributor

@ritankarsaha ritankarsaha commented Jun 9, 2025

This PR fixes the issue #3116

  • Now returns both text (legacy) and textNodes (array) fields
  • API returns separate text nodes as array
  • Frontend can now display obligation text as individual nodes

Closes #3116

Suggest Reviewer

@GMishx @amritkv

This is the entry in the couchdb now --

{
  "_id": "33d1fd9a922b183058ad4b494700a61e",
  "_rev": "1-5af712b377ae3d187971debb04f28d9d",
  "development": false,
  "textNodes": [
    "It is ensured that only analyzed Source Code is delivered and that the delivered binaries match  to the analyzed source code.",
    "Sw360 is a nice project  under Siemens"
  ],
  "issetBitfield": "0",
  "text": "It is ensured that only analyzed Source Code is delivered and that the delivered binaries match  to the analyzed source code.\nSw360 is a nice project  under Siemens",
  "whitelist": [],
  "obligationType": "OBLIGATION",
  "type": "obligation",
  "distribution": false,
  "title": "Analyzed source code matches the delivered binaries - 2",
  "obligationLevel": "COMPONENT_OBLIGATION"
}

Closes #3116

Checklist

Must:

  • [x ] All related issues are referenced in commit messages and in PR

@ritankarsaha ritankarsaha force-pushed the fix/separate-node branch 3 times, most recently from 6f1bbee to cb3a7c2 Compare June 9, 2025 23:03
@GMishx GMishx added needs code review needs general test This is general testing, meaning that there is no org specific issue to check for labels Jun 10, 2025
@ritankarsaha
Copy link
Contributor Author

Hey @GMishx ig the tests are failing because multiple tests are trying to use the same couchdb database simultaneously. ig adding retry logic to the test cases would fix them... should i try adding them to the test-cases? As I had checked the build properly without the test cases earlier, also the db is also getting updated properly with everything running.

@ritankarsaha
Copy link
Contributor Author

Hey @GMishx ig the tests are failing because multiple tests are trying to use the same couchdb database simultaneously. ig adding retry logic to the test cases would fix them... should i try adding them to the test-cases? As I had checked the build properly without the test cases earlier, also the db is also getting updated properly with everything running.

Hey @GMishx worked on this approach, added the retry logics, all the tests are now passing properly

image

Is there any better approach to this ?

Signed-off-by: RITANKAR SAHA <[email protected]>

feat(obligations): get texts as separate nodes

Signed-off-by: RITANKAR SAHA <[email protected]>
@ritankarsaha
Copy link
Contributor Author

@GMishx @amritkv , the build is now successful with all the tests. Could you please take a look and say if the approach is correct or not ?

@GMishx
Copy link
Member

GMishx commented Jun 23, 2025

Hey @ritankarsaha , we went through the old code to understand how it was working. Let us have a discussion about the same during the GSoC sync call?

@ritankarsaha
Copy link
Contributor Author

Hey @ritankarsaha , we went through the old code to understand how it was working. Let us have a discussion about the same during the GSoC sync call?

Yess yess suree @GMishx !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs code review needs general test This is general testing, meaning that there is no org specific issue to check for

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admin : Obligations : Edit : Get text as separate nodes

2 participants