website icon indicating copy to clipboard operation
website copied to clipboard

Add fallback for head of an institution

Open Ainali opened this issue 4 years ago • 6 comments

As discussed in #89 the data modeling on Wikidata is not totally settled yet. Besides the position, it could also be directly added on the agency with director / manager (P1037), chief executive officer (P169) or chair (P488) depending on the type. Add a fallback to the organization query so that we can capture those too.

If our current way to get the leader yields no result, we should display one of the others, and if there are several, prioritize them in the pick order P488, P169, P1037.

Ainali avatar Aug 28 '21 11:08 Ainali

Hi, is this issue still open? If yes, please provide me with the details so that I can solve

BharadwajSarma avatar Jul 14 '25 15:07 BharadwajSarma

Hi! 👋 I’ve gone through the context in #89 and this issue, and I understand the need to improve the fallback logic to fetch the head of an institution using properties P488 > P169 > P1037 in that order. I’ve already explored the relevant SPARQL queries and the current organization data-fetching logic in the codebase. I’d love to implement this fallback mechanism and test it properly. Kindly assign me this issue. Thank you!

Thermo041 avatar Jul 17 '25 22:07 Thermo041

Maybe include Secretary-General (P3975) as well.

RVA2869 avatar Jul 18 '25 07:07 RVA2869

Thank you for the suggestion, @RVA2869.
I’ll include the fallback for Secretary-General (P3975) along with the existing ones (P488, P169, and P1037) in the prioritized order.

Thermo041 avatar Jul 18 '25 08:07 Thermo041

Hi @RVA2869, I’ve implemented the fallback logic as discussed in #98 and created PR #542. Could you please review it. Thank you!

Thermo041 avatar Jul 18 '25 13:07 Thermo041

Hi all! 👋

Great work implementing the fallback logic with the properties P488, P169, P1037, and P3975!

If it’s helpful, I’d be happy to:

  • Test the functionality using real institutions where only one of these properties exists.
  • Help update documentation so future contributors understand the fallback order.
  • Suggest a user-friendly message in the UI when no leader data is available. Let me know where I can contribute.

Darshithaj avatar Jul 23 '25 14:07 Darshithaj