crs-tools / tracker

CRS Ticket Tracker
Apache License 2.0
18 stars 11 forks source link

Allow setTicketDone on encoding profiles disabled in a project #136

Closed a-tze closed 7 years ago

a-tze commented 8 years ago

Issue migrated from trac ticket # 136

component: rpc | priority: major | resolution: fixed

2016-09-04 21:54:16: @a-tze created the issue


Currently, running encoding jobs cannot complete when the associated encoding profile is disabled in the project's settings.

This is because those tickets are filtered out of view_servicable_tickets. The condition has either to be removed, or setTicketDone must use another data source. Maybe another view with less strict filtering? So that there is one view for tickets that can be given out (plus worker filters) and another one for tickets that may be completed or failed by workers?

a-tze commented 7 years ago

2017-03-05 11:54:52: @pegro commented


A patch like this removes that filter.

diff --git a/Application/Controller/XMLRPC/Handler.php b/Application/Controller/XMLRPC/Handler.php
index 0427b8a..f9ba614 100644
--- a/Application/Controller/XMLRPC/Handler.php
+++ b/Application/Controller/XMLRPC/Handler.php
@@ -595,7 +595,7 @@
                 - @throws Exception
                 -/
                public function setTicketDone($ticket_id, $log_message = null) {
-                       if(!$ticket # Ticket::findAll(['State'])->from('view_serviceable_tickets', 'tbl_ticket')->where(['id'> $ticket_id])->first()) {
+                       if(!$ticket # Ticket::findAll(['State'])->where(['id'> $ticket_id])->first()) {
                                throw new EntryNotFoundException(__FUNCTION__.': ticket not found or parent in wrong state',501);
                        }

The checks in this function still validate that:

Is there any situation, where a call to setTicketDone should fail, although all of the conditions above are met?

a-tze commented 7 years ago

2017-03-05 17:04:47: @a-tze commented


Is there any situation, where a call to setTicketDone should fail, although all of the conditions above are met?

All situations I can think of are covered by the remaining checks.

a-tze commented 7 years ago

2017-03-08 17:40:35: @pegro changed status from new to closed

a-tze commented 7 years ago

2017-03-08 17:40:35: @pegro set resolution to fixed

a-tze commented 7 years ago

2017-03-08 17:40:35: @pegro commented


Fixed in [changeset:bb655d7].