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

Fixed issue #18630: Survey list showing wrong icon for surveys. #2960

Merged

Conversation

gabrieljenik
Copy link
Collaborator

@gabrieljenik gabrieljenik commented Mar 2, 2023

The icon was failing only when time adjust was NOT zero, as then sExpired was null and sNow was todays, but adjusted.
When that happened: oStop was set to now and sNow was set to Now but adjusted. That made the bExpired to be true.

Created tests.
Did a small change to fix the situation, and avoid using the "sometimes-wrongly-calculated" value.

These needs to be reviewed a bit more as there is a lot of duplicated code.
Started a reorganization draft but will pick up later: #2957

So far, with this I think is a good starter.

  • Fix
  • No reorg
  • Tests (which will be usefull for making sure future reorg is ok)

Time adjust considered for icon generation.
Copy link
Collaborator

@Shnoulle Shnoulle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the update ?

I think it's near same code after and before …

application/models/Survey.php Outdated Show resolved Hide resolved
application/models/Survey.php Outdated Show resolved Hide resolved
Copy link
Collaborator

@Shnoulle Shnoulle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More clear 👍

@Shnoulle Shnoulle added Code review done Version checked for code issue without testing and removed Needs code review labels Mar 2, 2023
@sonarcloud
Copy link

sonarcloud bot commented Mar 2, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 52 Code Smells

0.0% 0.0% Coverage
27.1% 27.1% Duplication

@gabrieljenik gabrieljenik added Tested OK This PR has been tested by QA and works as expected and removed Needs testing labels Mar 14, 2023
@olleharstedt olleharstedt merged commit 40e74c2 into master Mar 22, 2023
@c-schmitz c-schmitz deleted the bug/18630-survey-list-showing-wrong-icon-for-surveys-basic branch June 20, 2023 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code review done Version checked for code issue without testing Has auto test Tested OK This PR has been tested by QA and works as expected
Projects
None yet
4 participants