Page MenuHomePhabricator

Consider returning null for undefined scores
Open, Needs TriagePublic

Description

Web2Cit server JSON response format ignores undefined scores (because undefined is not a valid value in JSON), which may cause confusion. For example, a user interpreting the response may think that the score has been omitted for some reason, instead of understanding that it cannot be calculated.

Consider having the Web2Cit server return null in these cases instead.

Event Timeline

DAseneca subscribed.

Hello Admin,

Please I would like to work on this task. Can you please assign this to me?

kind regards,
Prince

Sure yes, Prince! Looks like you've already assigned yourself to the task.

You may find development information about the Web2Cit server here: https://meta.wikimedia.org/wiki/Web2Cit/Server

Note that some recent work has been made on the w2c-server repository under a v1.1 branch. I should be merging this into the main branch by the end of this month.

We try to use semantic versioning. I'm not sure whether a change like this would need a major or minor version increment. Because we would be returning null where an API consumer (currently only Web2Cit-Monitor as far as I know) would have been expecting either a number or nothing at all, I wonder whether this would be considered a backwards-incompatible change, hence requiring a major version increment. In that case, you may just start working on v2.0.

Let me know if you have any questions!

@DAseneca: Hi! This task has been assigned to you a while ago. How is it going? Could you maybe share an update? Do you still plan to work on this task, or do you need any help? Thanks!

Hi @Aklapper yes I still plan on taking on the task. However, if you noticed, I have flagged the project for later because I have been engaged in some other projects that have been taking my time.

@DAseneca Removing task assignee as this open task has been assigned for more than two years - See the email sent on 2025-05-22.
Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome!
If this task has been resolved in the meantime, or should not be worked on by anybody ("declined"), please update its task status via "Add Action… 🡒 Change Status".
Also see https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator. Thanks!