I want to create sub-tasks but have some required fields. When I used the current 'Create sub-task' action I get errors in the audit log.
You can also use the 'Create issue' action to create sub-tasks. It's not as straight forward, but allows you to specify additional fields.
For example you can configure a rule like this:
Project automation - JIRA 2016-09-07 09-12-39.png
So we're using the create issue action, specifying a sub-task issue type, summary and then use the 'Advanced' section to set the parent (and add a label in this case, but you can set any field value really):
{ "fields": { "parent": { "key":"{{issue.key}}" } }, "update": { "labels": [{"add": "sample-label"}] } }
If you need to create multiple sub-tasks, then you'd have to add multiple 'Create Issue' actions to your rule.
What would I write in the Advanced section if I wanted to create links?
For example:
When issue X has a certain update, create issue Y and link them.
Issue X relates to Issue Y.
thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Phyllis,
Yes you can do this with the advanced section. I've raised a new question to answer this:
https://answers.atlassian.com/questions/41478447
Cheers,
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The problem with that solution is that it only allows you to create issues under specific projects. While in creating sub-tasks you are creating them under the issue you create in whatever project you need. I am still looking for a solution of creating an epic in any project that would also create many sub-tasks under it. It doesn't create them because all our tickets have a required due date field. If only there was a way to set default values for those fields when creating the sub-tasks...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Vlad Gomzyakov,
So if you're using the "Create issue" action in Automation for JIRA, then you can certainly set the due date to a default value on create. Extending the example from above, you can add this to your Advanced section:
{ "fields": { "parent": { "key":"{{issue.key}}" }, "duedate": "{{#now}}func=plusWeeks(1),format=\"jiraDateTime\"{{/now}}" }, "update": { "labels": [{"add": "sample-label"}] } }
The important bit is:
{{#now}}func=plusWeeks(1),format=\"jiraDateTime\"{{/now}}
It will set the due date to one week from now. For more info on dates in smart-values see working with dates. It's not the prettiest syntax right now, and we'll most likely improve this in future.
Let me know in case this doesn't work for you!
Cheers,
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.