Copying a form using Jira automation

Bill Goetz May 23, 2022

I'm not having success using Jira automation to copy a form. We have a master ticket with a submitted form. We'd like to create a second ticket, copy the form and link the second ticket to the master. My issue gets created successfully and linked but not seeing any forms get copied over.

copyform2.png

¯\_(ツ)_/¯

 

3 answers

1 accepted

Suggest an answer

Log in or Sign up to answer
3 votes
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 23, 2022

Hi @Bill Goetz 

To copy the forms, I believe you need to first branch to Most Recently Created issue (e.g. Vendor - Commercial) after the create.  Otherwise the rule is trying to copy forms to itself.

  • trigger: manually triggered
  • condition: on the initiator
  • action: create the new issue
  • branch: on most recently created issue
    • action: copy forms from the trigger issue
  • action: link to most recently created issue

Also I noted that Commercial in your issue type name appears to be misspelled, or is that the desired spelling?

Kind regards,
Bill

Bill Goetz May 25, 2022

Ah! I needed to branch after the creation of the second ticket. This worked great.

workinginstall.png

Also, yes, I do have the issue type spelled incorrectly. I'll get that updated!

Thank for your comments!

Like # people like this
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 25, 2022

Well done, and another tip on automation rules...

In your update you selected the branch on "For All Created Issues", instead of the "For Most Recently Created Issue".  Currently your rule only creates one issue and does not appear to do anything after the branch...and...

Branches which can be on one-and-only-one issue get converted to run "inline", and so they finish before other steps in the rule.

But, branches which *could* have more than one issue...

  • run in parallel, asynchronously, and...
  • the branch is not guaranteed to finish before any next steps.  In fact, everything else in the rule could finish first.

What's the impact?  If you later add things to the rule after the branch, you cannot rely on anything in the branch finishing first...so if you need that info, the rule could appear to randomly work/not work.

Just wanted to let you know  :^)

Rebecca Baillie August 18, 2022

Hi @Bill Sheboy  I'm trying to achieve the same thing as the O.P. - every part of my automation rule is working as expected except that the form won't attach to the newly created issue.

According to the audit log errors there are "no forms attached" but the original/ trigger issue does contain a briefing form.

rules.JPG

Are you able to see where I've gone wrong please? 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 18, 2022

Hi @Rebecca Baillie 

I found this open suggestion that says copying forms with automation to a different project is not yet possible.  Does that match your situation?  Please watch/vote for this one to see its progress:

https://jira.atlassian.com/browse/JSDCLOUD-11399

Kind regards,
Bill

Like Thomas Andrews likes this
Rebecca Baillie August 19, 2022

Hi Bill,

 

I see, yes that would explain the issue. Thanks for the insight - much appreciated.

 

Kind Regards,

Rebecca

Like Bill Sheboy likes this
1 vote
cristian_filip July 7, 2023

Just so that any person in the future will use this. 

I managed to make it work through 2 methods, only one of them is automated however.

1. Moving it manually.

If you need to modify the form then you can move the issue manually. However you cannot clone it as cloning the issue will just link it to the original one where the form is inside of.

2. Creating the form as an attachment

When you go into the form settings you have a option to save it as PDF and attach it to the issue automatically. This way when you create the automation to move it you can also add the attachment field and then you can copy it anywhere. However do keep in mind that this way you cannot edit the form. You can only see the attachment with the form inside of it.

 

Even if this is a temporary solution until they eventually add the functionality of copying a form directly, it is a solution for the time being.

0 votes
Thomas Andrews August 24, 2022

@Rebecca Baillie , @Bill Sheboy, I stumbled across this post trying to do the same myself, clone a form from one project to another which is not yet possible as per Bill's post.

I still wanted this functionality so I instead mirrored the form using text entry fields for the request type, the requester is still presented with a form to fill in, albeit put together differently in the Jira configuration.

I then created an automation rule that upon creation of the service portal ticket the description was edited to include all of the information in the description of the ticket similar to the following;

Trigger: When issue created
Condition: Request Type = Your request type
Action: Edit issue fields (description)

Form field 1
{{issue.text field 1}}

Form field 2
{{issue.form field 2}}

Form field 3
{{issue.form field3}}

A second automation rule is then present to clone the ticket as follows;

Trigger: Field value changed
-Fields to monitor : Description
-Change type : Any changes to this field
-For: Edit issue
Action: Clone issue
-Project: Destination project
-Issue Type: Destination issue type
-Summary: Destination summary
-Fields set: Fields you wish to populate

I do not use any conditions on the clone, but I might change that so that the rule on triggers on "automation by Jira" rather than a user based edit.

The reason I did the above was to avoid populating every potential destination project with additional text based fields, and to collate the information in a single, easy to read way for the request owner to complete.

I hope that's of some help if you still wanted some way to get around the inability to clone forms.

TAGS
AUG Leaders

Atlassian Community Events