Create a ticket each week via automation, and attach a different form

Jamien Price
Contributor
July 17, 2024

Hi all,

I have 40 different tasklists. Each list needs to be done once a year. I have 40 forms for each of these tasklists. I now want a ticket to be created with one of the lists per week. ie.:

- week 1 > create a new ticket and attach task list 1
- week 2 > create a new ticket and attach task list 2
- week 3 > create a new ticket and attach task list 3, etc.

I know how to make an automation with a "schedule" trigger and a CRON that says "if week 1, create a ticket with task list 1". What I would LIKE to avoid though is having FORTY different automations, one for each week.

Is it possible to do this with one automation that attaches a different form depending on what week of the year it is?

Thanks.

1 answer

0 votes
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.
July 18, 2024

Hi @Jamien Price 

First thing, I am not currently using JSM and so I cannot test my suggestion.  With that out of the way...

I recommend checking if the Attach Forms action can take a smart value to select the form.  If that does work, you could try:

That likely will produce a rule with just a few steps.

Kind regards,
Bill

Jamien Price
Contributor
July 30, 2024

It's a good idea and I like the logic, though I don't see any smart values for forms, and the "attach form" option is just picking from a drop down so I don't know that I could inject a smart value even if they did have them unfortunately.

Thanks for the idea though.

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.
July 31, 2024

Although it is not obvious with the rule editor, many of the edit fields which have a dropdown values list have the ability to accept a smart value expression.

Please try this with the Attach Forms action and a test rule:

  • in the edit field, type in a smart value representing the form
  • when you do, it will appear below the field
  • select it, and it will then be used
  • test your rule

 

 

Jamien Price
Contributor
July 31, 2024

I assume you mean this field - which when I type into it it appears to just filter the options in the dropdown.

2024-08-01_08-35-34.png

However, even if it does have the potential to accept smart values it doesn't appear you can reference forms in that way unfortunately:

2024-08-01_08-34-14.png

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 1, 2024

Thanks for testing that with the rule action.  And, the bot answer seems to be referring to smart values for issues, not for rule actions.

 

A workaround you can use is calling the REST API endpoint to add the form to the issue using the Send Web Request action.  You will need the list of the form id values for that (and storing them with a Lookup Table may help).

If you want to try this, here are the references you need:

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events