Hi Chia-liang et al, It transpires the approval ticket is actually created, although I am unable to see it unless I look up the id directly, even though my user currently has every right imaginable. Further, when I reject the (hidden) approval, this appears to be succesful. However, when I resolve the (still hidden) approval, I see the following error:
System error error: Can't call method "HasUnresolvedDependencies" on an undefined value at /opt/rt3/bin/../local/lib/RT/Approval/Rule/Passed.pm line 35. context: ... 31: 32: $obj->SetStatus( Status => 'open', Force => 1 ); 33: } 34: 35: my $passed = !$top->HasUnresolvedDependencies( Type => 'approval' ); 36: my $template = $self->GetTemplate( 37: $passed ? 'All Approvals Passed' : 'Approval Passed', 38: TicketObj => $top, 39: Approval => $self->TicketObj, ... code stack: /opt/rt3/bin/../local/lib/RT/Approval/Rule/Passed.pm:35 /opt/rt3/bin/../lib/RT/Ruleset.pm:73 /opt/rt3/bin/../lib/RT/Transaction_Overlay.pm:189 /opt/rt3/bin/../lib/RT/Record.pm:1456 /opt/rt3/bin/../lib/RT/Ticket_Overlay.pm:3259 /opt/rt3/bin/../lib/RT/Ticket_Overlay.pm:2961 /opt/rt3/bin/../lib/RT/Record.pm:898 /opt/rt3/bin/../lib/RT/Interface/Web.pm:940 /opt/rt3/bin/../lib/RT/Interface/Web.pm:1052 /opt/rt3/share/html/Ticket/Modify.html:82 /opt/rt3/share/html/autohandler:311 raw error -- Richard Foley Ciao - shorter than aufwiedersehen http://www.rfi.net/ On Thursday 26 February 2009 17:52:52 Richard Foley wrote: > Oh, wait a minute, there's more. > > 1. Going into: > > Configuration -> Queues -> crs -> Scrips > > I made sure each subject line was on single line and replaced a couple of stray dashes, (I think the \xE2 was > a "−>" thing instead of a "−>" thing in the auto-generated template from bin/rt-workflow - which was installed via > the CPAN), like this: > > Subject: Development Approval for: {$Tickets{TOP}->Id} − $Tickets{TOP}->Subject} > > 2. Which brought me to this error: > > Use of uninitialized value $content in concatenation (.) or string > at /opt/rt3/bin/../lib/RT/Action/CreateTickets.pm line 669. > > Which I fudged with this: > > $content = '' unless $content; > > 3. Which brought me to here: > > [Thu Feb 26 16:50:59 2009] [debug]: Workflow: processing create-workflow-Implemented Approval of > RT::Ticket=HASH(0x7fe03efb52f0) (/opt/rt3/bin/../lib/RT/Action/CreateTickets.pm:360) > [Thu Feb 26 16:50:59 2009] [debug]: Workflow: evaluating > Subject: Implemented Approval for: {$Tickets{TOP}->Id} - $Tickets{TOP}->Subject} > Refers-To: TOP > Queue: ___Approvals > Owner: > Requestors: {$Tickets{TOP}->Requestors} > Depended-On-By: TOP > Type: approval > Depends-On: workflow-Tested Approval > Content-Type: text/plain > Due: {time + 86400} > Content: xxx > ENDOFCONTENT (/opt/rt3/bin/../lib/RT/Action/CreateTickets.pm:653) > [Thu Feb 26 16:50:59 2009] [debug]: Workflow: yielding (/opt/rt3/bin/../lib/RT/Action/CreateTickets.pm:671) > [Thu Feb 26 16:50:59 2009] [debug]: not a recognised queue object. (/opt/rt3/bin/../lib/RT/Ticket_Overlay.pm:279) > [Thu Feb 26 16:50:59 2009] [debug]: RT::Ticket=HASH(0x7fe03f1c0278) No queue given for ticket creation. > (/opt/rt3/bin/../lib/RT/Ticket_Overlay.pm:284) > [Thu Feb 26 16:50:59 2009] [error]: Couldn't create related ticket create-workflow-Implemented Approval for 16 > Could not create ticket. Queue not set (/opt/rt3/bin/../lib/RT/Action/CreateTickets.pm:391) > > Which makes me think I must be yet closer to a working approvals system, but still no potato in sight...sigh! > > All (helpful) suggestions welcome, Chia-liang! > > -- > Richard Foley > Ciao - shorter than aufwiedersehen > > http://www.rfi.net/ > > On Thursday 26 February 2009 16:20:49 Richard Foley wrote: > > On Tuesday 24 February 2009 12:42:15 Chia-liang Kao wrote: > > > Hi, > > > > > > RTx::WorkflowBuilder is a tool that helps you configure multi-stage > > > approval workflow in rt. > > > > > > It is now available at http://search.cpan.org/dist/RTx-WorkflowBuilder/. > > > > > Hi Chia-liang, > > > > This looks good, although it doesn't appear to work smoothly yet. > > > > 1. In your pod you have: > > > > % bin/rt−workflow PO PO‐Approval −−create > > > > Which should probably read: > > > > % bin/rt−workflow --create PO PO‐Approval > > > > 2. When I had set up the workflow within my RT_SiteConfig.pm, and run the > > bin/rt-workflow script to create the scrips and templates, I naturally > > created a ticket. Nothing happened, but I noticed in the logs there was the > > following entry: > > > > Found 0 scrips for TransactionBatch stage with applicable type(s) > > > > So, I changed went into: > > > > Configuration -> Queues -> crs -> Scrips > > > > and changed "Stage" from "Transaction Create" to "Transaction Batch". > > > > 3. The next time I created a ticket, the workflow/approval mechanism kicked in > > and the log files filled up, but no approvals were created - because of a > > stray character: > > > > ENDOFCONTENT (/opt/rt3/bin/../lib/RT/Action/CreateTickets.pm:669) > > [Thu Feb 26 14:50:29 2009] [error]: Ticket creation failed: Unrecognized > > character \xE2 in column 44 at template line 1. > > > > Stack: > > [template:1] > > [/opt/rt3/bin/../lib/RT/Action/CreateTickets.pm:667] > > [/opt/rt3/bin/../lib/RT/Action/CreateTickets.pm:366] > > [/opt/rt3/bin/../lib/RT/Action/CreateTickets.pm:303] > > [/opt/rt3/bin/../lib/RT/ScripAction_Overlay.pm:238] > > [/opt/rt3/bin/../lib/RT/Scrip_Overlay.pm:464] > > [/opt/rt3/bin/../lib/RT/Scrips_Overlay.pm:196] > > [/opt/rt3/bin/../lib/RT/Scrips_Overlay.pm:175] > > [/opt/rt3/bin/../lib/RT/Ticket_Overlay.pm:3165] > > [/opt/rt3/local/html/Ticket/Create.html:394] > > [/opt/rt3/share/html/autohandler:311] > > (/opt/rt3/bin/../lib/RT/Action/CreateTickets.pm:672) > > [Thu Feb 26 14:50:29 2009] [warning]: Exiting subroutine via next > > at /opt/rt3/bin/../lib/RT/Action/CreateTickets.pm line 678. > > (/opt/rt3/bin/../lib/RT/Action/CreateTickets.pm:678) > > > > I'm not sure which bit of which Template, or code, might be causing this > > error, but I think we're close to having a working Approvals system in the > > outside world though. What do you think? > > > > -- > > Richard Foley > > Ciao - shorter than aufwiedersehen > > > > http://www.rfi.net/ > > _______________________________________________ > > http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users > > > > Community help: http://wiki.bestpractical.com > > Commercial support: [email protected] > > > > > > Discover RT's hidden secrets with RT Essentials from O'Reilly Media. > > Buy a copy at http://rtbook.bestpractical.com > > _______________________________________________ > http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users > > Community help: http://wiki.bestpractical.com > Commercial support: [email protected] > > > Discover RT's hidden secrets with RT Essentials from O'Reilly Media. > Buy a copy at http://rtbook.bestpractical.com _______________________________________________ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: [email protected] Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
