Add an attachment to a ticket on Create?

Issue #920 resolved
Scott McDonald
created an issue

Hello:

Upon create, we have a form that we need each user to complete and add to the ticket. We would ultimately like the form to be in the attachment field when the user clicks create but even if and when the user creates the ticket and JIRA assigns it a ticket number (ex: JIRA-123), an attachment will automatically be added.

Scott

Comments (3)

  1. Fidel Castro Armario repo owner

    Hi @Scott McDonald,

    Sorry, but I don't understand exactly what you intend to do, since I don't know how can JWT find the file to be attached automatically. I imagine the file is in somewhere in the local disk of the user who creates the issue. If that's the case, it's not possible to attach it automatically.

    As an alternative, we a use a validator to require that a file is attached to the issue at the moment of issue creation. We can require a specific name or extension for the file to be attached. To do it you should use "Boolean validator with math, date-time or text-string terms" with expressions like these ones:

    1) Require at least one attachment:

    %{00160} != null
    

    2) Require an attachment with .txt extension:

    %{00160} ~ ".txt"
    

    3) Require an attachment with name 'my_form.txt':

    %{00160} ~ "my_form.txt"
    

    Where %{00160} is field code for Transition`s attachments.

    Note that, currently, a bug in JIRA (JRASERVER-65939) is preventing these boolean expressions to work in JIRA 7.4.4 to 7.6.0. Atlassian is currently working to fix it, and most probably it will be solved in next version of JIRA.

  2. Log in to comment