Bug #87375

Proper exception messages for Scheduler::fetchTask()

Added by Stefanos Karasavvidis 6 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
scheduler
Target version:
-
Start date:
2019-01-09
Due date:
% Done:

100%

TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The method Scheduler::fetchTask() takes an optional uid as argument. If the uid is given, the task with this uid should be returned.

If no uid is given, the next scheduled overdue task should be returned (the method description says "the next due task", but what is implemented is the next task that is overdue).

A) If a uid is given but this uid does not exist, an exception with the misleading message 'Query could not be executed. Possible defect in tables tx_scheduler_task or tx_scheduler_task_group or DB server problems' is thrown.

B) If no uid is given, and no task is overdue, an exception is thrown. The current code tries to use as message "No task". But this part is never reached.

A) should be fixed to a proper message, like "no such task"

B) is never reached because the check for A precedes it and evaluates to true even for case B.

Associated revisions

Revision 08295e09 (diff)
Added by Stefanos Karasavvidis 5 months ago

[BUGFIX] Use proper exception messages for Scheduler::fetchTask()

Use a proper message in case a non existent uid was passed and
correctly handle the case where no task uid was passed and no task
is overdue.

Resolves: #87375
Releases: master, 9.5, 8.7
Change-Id: I69d2798cc185451c889bf37d8a007eacf572c163
Reviewed-on: https://review.typo3.org/59385
Reviewed-by: Daniel Goerz <>
Tested-by: Daniel Goerz <>
Tested-by: TYPO3com <>
Reviewed-by: Fabien Udriot <>
Tested-by: Fabien Udriot <>
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>

Revision b62cff95 (diff)
Added by Stefanos Karasavvidis 5 months ago

[BUGFIX] Use proper exception messages for Scheduler::fetchTask()

Use a proper message in case a non existent uid was passed and
correctly handle the case where no task uid was passed and no task
is overdue.

Resolves: #87375
Releases: master, 9.5, 8.7
Change-Id: I69d2798cc185451c889bf37d8a007eacf572c163
Reviewed-on: https://review.typo3.org/59613
Tested-by: TYPO3com <>
Reviewed-by: Mona Muzaffar <>
Tested-by: Mona Muzaffar <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>

Revision 8b26ad40 (diff)
Added by Stefanos Karasavvidis 5 months ago

[BUGFIX] Use proper exception messages for Scheduler::fetchTask()

Use a proper message in case a non existent uid was passed and
correctly handle the case where no task uid was passed and no task
is overdue.

Resolves: #87375
Releases: master, 9.5, 8.7
Change-Id: I69d2798cc185451c889bf37d8a007eacf572c163
Reviewed-on: https://review.typo3.org/59614
Tested-by: TYPO3com <>
Reviewed-by: Mona Muzaffar <>
Tested-by: Mona Muzaffar <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>

History

#1 Updated by Stefanos Karasavvidis 6 months ago

B) is never reached because the check for A precedes it and evaluates to true even for case A.

To make this clearer: if no uid is passed to the method, and no task is overdue, again the 'Query could not be executed. Possible defect in tables tx_scheduler_task or tx_scheduler_task_group or DB server problems' message is used in the exception

#2 Updated by Gerrit Code Review 6 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59385

#3 Updated by Gerrit Code Review 6 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59385

#4 Updated by Gerrit Code Review 5 months ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59385

#5 Updated by Gerrit Code Review 5 months ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59385

#6 Updated by Gerrit Code Review 5 months ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59385

#7 Updated by Riccardo De Contardi 5 months ago

  • Category set to scheduler

#8 Updated by Gerrit Code Review 5 months ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59613

#9 Updated by Gerrit Code Review 5 months ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59614

#10 Updated by Stefanos Karasavvidis 5 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#11 Updated by Benni Mack about 2 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF