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

Hungarian queue has stopped working #198

Open
meskobalazs opened this issue Mar 26, 2024 · 6 comments
Open

Hungarian queue has stopped working #198

meskobalazs opened this issue Mar 26, 2024 · 6 comments
Labels
Bug Something isn't working Good First Issue Good for newcomers

Comments

@meskobalazs
Copy link
Contributor

Description

I'm no longer receiving notifications for the Hungarian queue. English still works perfectly fine.

Steps to Reproduce

  1. Open the settings
  2. Select all products and Hungarian for language
  3. Refresh

Expected behavior:

I should receive notifications for the new threads.

Actual behavior:

There are no notifications for the queue.

System information

  • Operating system and Firefox version: Fedora 39 + Firefox 123.0 / Ubuntu 23.10 + Firefox 123.0 / Windows 10 + Firefox 25.0b3 (Developer Edition)
@jhonatasrm jhonatasrm added Bug Something isn't working Good First Issue Good for newcomers and removed Bug Something isn't working Good First Issue Good for newcomers labels Mar 29, 2024
@jhonatasrm
Copy link
Collaborator

image

Hello @meskobalazs,

Today we requested questions from the forum that have not been answered, and in this case, none meet the criteria. In the future, we may add an option that does not include this parameter of 0 community contribution interactions.

I believe could be a good addition, what do you think @WesleyBranton and @dannycolin ?

@dannycolin
Copy link
Collaborator

I believe could be a good addition, what do you think

I'm fine with offering this option if someone wants to contribute a patch.

@jhonatasrm
Copy link
Collaborator

Yes, it looks good to me. I think a good addition would be an option to filter for open questions (not set as resolved) with or without interactions from the community.

@meskobalazs
Copy link
Contributor Author

meskobalazs commented Apr 2, 2024

What I find puzzling is that this request yields results currently: https://support.mozilla.org/api/2/question/?format=json&ordering=-id&is_solved=false&is_spam=false&is_locked=false&is_archived=false&locale=hu&num_answers=0.

Even filtering for product is working. But still, the extension does not show anything.

Edit: I managed to open it in the debugger. One potential problem I found was the product name is apparently wrong in the queries. product=Firefox and product=Thunderbird yields no results, but if I make them lowercase, they do.

@jhonatasrm
Copy link
Collaborator

jhonatasrm commented Apr 4, 2024

Currently, we notice that when we send the product name using the Upper Camel Case pattern (Firefox, Thunderbird...), it impacts the display of the expected result, constituting a bug. We must also analyze the handling of other product names in this regard.

We need to pass the product name using Lower Camel Case (firefox, thunderbird...).

Current querying by product:

Firefox: https://support.mozilla.org/api/2/question/?format=json&ordering=-id&is_solved=false&is_spam=false&is_locked=false&product=Firefox&is_taken=false&is_archived=false&locale=hu&num_answers=0
Thunderbird: https://support.mozilla.org/api/2/question/?format=json&ordering=-id&is_solved=false&is_spam=false&is_locked=false&product=Thunderbird&is_taken=false&is_archived=false&locale=hu&num_answers=0

Desired querying:

Firefox: https://support.mozilla.org/api/2/question/?format=json&ordering=-id&is_solved=false&is_spam=false&is_locked=false&product=firefox&is_taken=false&is_archived=false&locale=hu&num_answers=0
Thunderbird: https://support.mozilla.org/api/2/question/?format=json&ordering=-id&is_solved=false&is_spam=false&is_locked=false&product=thunderbird&is_taken=false&is_archived=false&locale=hu&num_answers=0

Additionally, we have another function that checks the creation time of the question to determine if it should be displayed within a certain deadline.

function isWithinTimeRange(timeString) {
    const timeLimit = 24;     // In hours
    let currentTime = new Date();
    const timezone = currentTime.getTimezoneOffset() * 60 * 1000;     // Must manually remove the timezone offset
    currentTime = new Date(currentTime - timezone);                   // because SUMO API displays a local timestamp, but labels it UTC
    const minimumTime = currentTime.getTime() - (timeLimit * 3600000);
    const questionTime = new Date(timeString).getTime();

    return questionTime >= minimumTime;
}

P.S. It appears that this issue is only present in Hungarian. However, we must also examine other languages to verify how the request to the product on the API is sent, whether it's in Lower Camel Case or Upper Camel Case.

@jhonatasrm jhonatasrm added Bug Something isn't working Good First Issue Good for newcomers labels Apr 4, 2024
@jhonatasrm
Copy link
Collaborator

I'll be addressing this bug. Additionally, I've created an enhancement issue directly linked to the bug of this filter for Hungarian. It is:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Good First Issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants