On Tuesday, June 14, 2016 at 2:40:10 PM UTC-4, Matthew Frazer wrote:
>
> Hello,
>
> I am looking for a way to incorporate attaching a file into the ticket 
> state change of a custom ticket workflow. The basic idea is that as part of 
> the "close ticket" action, the tester will be prompted to attach the PDF 
> file of the test results. I know that the tester could just manually select 
> attach file before closing the ticket, but we want a more guided approach 
> where it is clear that the document must be attached before closing.
>
> Does anything exist out there that could do this? If not, I'm trying to 
> build a plugin to do it. I understand from looking at example plugins how 
> to build a simple TicketActionController to generate input textboxes and 
> the like, but I'm way over my head in understanding how to incorporate 
> attachments. Could anyone offer some pointers on where to look to figure 
> this out? Or, if I'm looking at this all wrong, please set me straight!
>
> Thanks
> Matt.
>

I think it would probably be difficult to integrate the add attachment form 
directly into the workflow, however you could use the time when the ticket 
transitions to the "needsattachment" state as a reference, and not render 
the close action until an attachment has been added with a timestamp 
greater than that reference time. Checkout the attachment table in the 
database schema:
https://trac.edgewall.org/wiki/TracDev/DatabaseSchema#DatabaseSchemaTrac0.12

- Ryan

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-dev+unsubscr...@googlegroups.com.
To post to this group, send email to trac-dev@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-dev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to