Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate why we are not using the contract ID consistently #1173

Closed
2 tasks done
adinuca opened this issue Jan 7, 2019 · 2 comments
Closed
2 tasks done

Investigate why we are not using the contract ID consistently #1173

adinuca opened this issue Jan 7, 2019 · 2 comments
Assignees
Labels

Comments

@adinuca
Copy link
Contributor

adinuca commented Jan 7, 2019

Why

We are using contract_id to retrieve the annotations for the search page, but we are using open_contracting_id for retrieving annotations, metadata and text when viewing a contract.

What

  • Investigation is done on why we are not using the same ID of the contract everywhere
  • Follow up issues are raised to make the behaviour consistent

Notes

@adinuca adinuca self-assigned this Jan 7, 2019
@adinuca adinuca transferred this issue from another repository Jan 7, 2019
@adinuca adinuca added the Vitamin label Jan 7, 2019
@adinuca
Copy link
Contributor Author

adinuca commented Jan 8, 2019

Conversation with Anjesh( it was on the wrong issue) :

Hi @anjesh ,
Do you know why we are using the contract_id to retrieve annotations for the search page but we are using open_contracting_id to retrieve annotations, metadata and text when viewing a contract?
Eg:
The following request to the API is made when the user accesses https://staging.resourcecontracts.org/contracts : /contract/84/annotations?lang=fr&category=rc
But when the user views the first contract in the results, the request for annotation will be made to /contract/ocds-591adf-8082857980/annotations?lang=fr&category=rc.

Thanks!

 @anjesh
 Member
anjesh commented 20 minutes ago
@adinuca that is the legacy issue, but both contract_id and ocid works in all the urls and APIs as far as i remember. The public site now uses ocid to retrieve the data, but contract_id works as well. We started with contract_id and later it was decided to use ocid in public sites and eventually that is reflected in APIs as well. But previous source-codes might not have been updated as it works with both ids.

 @adinuca
 Member
adinuca commented 18 minutes ago
Hi @anjesh ,
Thank you for your answer. I am not looking to deprecate this feature, I was asking because using the same ID everywhere in RC Subsites would reduce the number of calls to the API, because the call for the annotations might be already cached when a user clicks on a contract.

 @anjesh
 Member
anjesh commented 8 minutes ago
Thanks. That makes sense. Could you create an issue to update the code for consistent ids across the subsites for performance issue? We will discuss with Charles before we work on that.

 @adinuca
 Member
adinuca commented 6 minutes ago
Sure. Thank you!

@adinuca
Copy link
Contributor Author

adinuca commented Jan 8, 2019

#1175 has been raised to deal with inconsistent requests.

@adinuca adinuca closed this as completed Jan 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant