I am creating an automation to create a task with 3 sub-tasks within it on a certain day. When I click Choose Fields to Set in the sub-task and choose Parent, it doesn't show up on the screen for me to fill out. It is a company managed project and I've attached screenshots of the Choose Fields to Set dropdown with Parent in it and the full screen of the sub-task I am creating. Does anyone know what I'm doing wrong?
Hi @deseymour
In the image you posted, I see "Parent work item" noted as a field to enter. Is that the one you are looking for?
Kind regards,
Bill
Ya know...I don't know. The info I was using to create this said that I needed to create a variable for the parent item and then put that in the parent field. But I can't put anything into that Parent Work Item except what is in the dropdown for it. The choices are Work Item or Trigger Work Item. I'm adding a screenshot of my whole automation with the variable I created opened so you can see what I was trying to do...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First, let's try the smart value way:
There are a few fields like this in rules where they accept a smart value, and it is not obvious how to enter it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, I tried, but I got a bunch of errors. Maybe I'm just not doing any of it correctly. Here is the Audit Log. Let me know what else might help you determine where I might be going wrong.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @deseymour
Well, that is a different error...seemingly because that subtask type is not setup in the project. Some follow-up questions / requests are:
1) Please note in the audit log for the first, Create Work Item action for the Task that no issue type was selected. What value did you use in the dropdown for that action?
2) Please post an image of one of the complete Create Work Item actions for a subtask showing what you selected / entered.
3) What is the scope of the rule in the details section at the top: single-project, multiple-project, or global?
4) If the scope is single-project, I note you are creating the items apparently all in the "Recurring Work (RW)" project. Is that the same project as where the rule is defined?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you! I will look at these things, but wanted to let you know I am on vacation for the next few days. So, don't worry about checking on it until Tuesday or Wednesday next week. Thank you for all your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Darn it. I tried to post answers to you questions a couple of days ago, but I guess it didn't post. So, I'll try again.
1) I chose Task as you can see in the screenshot Create Task.
2) You can see this in the screenshot Create Subtask.
3) The rule should work only for the Recurring Work space (see screenshot Full Automation Flow for breadcrumbs.)
4) Recurring Work is where the rule is defined.
I also added a screenshot for all the other boxes in the flow so you can see what I entered in them. Please let me know if you need anything else.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @deseymour
Before we do anything else, let's check if the rule is "glitched". That can happen from too many edit / publish cycles where the behind-the-scenes stuff gets corrupted. To test that:
If that does not help...
Are you getting that same error where the "Sub-task" type seems to not be found? If so...Let's try three ways clarify things for the rule:
#A) Explicitly select the options
When creating the Task, specifically select both the project / space and the issue type. Do the same thing for the Sub-task actions.
If that does not help...
#B) Let's restructure the rule to avoid using the variable completely
If that does not help...
#C) Let's use JSON to set the parent
{"fields": {"parent": {"key": "{{issue.key}}"}}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In your last set of steps, you say not to add the parent with the dropdown list. But Work Item is the default choice in that field and it's a required field. Can I just leave that in there and still use the JSON?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Let's ignore that last approach as it is more relevant when using Edit Work Item or when creating a work item with Send Web Request and the REST API directly.
When you tried the other ideas, what happened: test for glitched rule, explicitly select options, or use a branch?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I got errors each time. However, the first error changed to the Different Error screenshot. I believe the errors after the variable statement stayed the same.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Very weird, indeed!
Just to confirm: in all of the Work Item Create actions, you explicitly selected:
The only references I have found for that error message were caused by: glitched rules from the initial editor save, or when "Same Space" and "Same Type" were selected but the rule trigger did not provide a source issue from which to copy the values.
One last thing to check: do you have different subtask types, perhaps named Subtask versus Sub-task, and the wrong one is associated to the space / project?
If it is neither of those, and you are on a paid Jira license level, you may need to ask your Jira Product Admin to submit a ticket to Atlassian Support to take a look.
https://support.atlassian.com/contact#/
When you hear back from them, please post what you learn to benefit the community. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yup. I specified exactly which work type and space everywhere I could. I checked and only have one Task and one Sub-Task in the list of Work Items, so that's not it either. I will put in a ticket. Is there something I can do for this that will help you since you did so much to try to help me? Obviously it's not the answer since we didn't fix it, but...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@deseymour -- I recommend adding a link to this thread to your support ticket to show Atlassian Support what was tried (i.e., so they don't start with non-value-adding suggestions ;^)
Then once resolved, post the info here...and if there is a different solution approach, create your own answer in the thread and accept it. Future readers will then see "the fix" as the accepted one.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, I have discovered that if I remove the Start and Due Dates from being created on the task, it creates it. So maybe there is something weird with them. I was successful in creating the task if I just put in Start Date with {{now()}}. However, if I try to add the Due Date as {{startdate.plusDays(5)}} and Story Points of 5, it gives me a new error. Also, I don't really understand why it shows me creating 2 tasks with the same number. I have attached a new screenshot of the updated Task Creation screen and the new error. I'm not even trying to do the Sub-Task yet...so we can get to that later. What do you think?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As an FYI...I noticed today the rule editor and audit log results features / UX have changed quite a bit in the last 24 hours, so perhaps some of what you see for the log is related to those changes.
For the two specific new things you noted:
You appear to be using the incorrect smart value for the Start Date field. As a reminder, you may use this how-to documentation to confirm the smart values (or custom field ID) for a field. Smart values are name, spacing, and case-sensitive, and when an unknown one is used that returns a null value, often failing silently.
Does your rule trigger have JQL such that you are setting the Due Date based upon the trigger work item's {{triggerIssue.Start date}} smart value? Or, are you trying to set the values only based upon {{now}}?
There are two company-managed, built-in field types for date-stuff: a date-picker and a date / time-picker. And, some of the older fields like Due Date are a bit fussy in rules occasionally. My recommendation: when setting a date-only field, force the value to the text jiraDate format to help the rule set the value by dropping the time part. For example for your Due date Field:
For the error with the Story Points field, have you checked if someone added another field with the same name to the scope of that space / project?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I looked at the how-to documentation, but when I find a field, I don't have a footer that shows me anything. I click on it or highlight it or whatever and nothing happens. I barely understand what I'm doing though, so who knows if I'm doing it correctly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As for the dates...I am trying to set the Start Date to the date when the work item is created and the due date to 5 days later. So, if it's created on Monday, the start date would be that Monday and the due date would be that Friday.
Instead of jiraDate, can I use shortDate? JiraDate is very strangely formatted for the US.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No worries as that doc can be a bit challenging to follow. Another way to find the correct smart value for a field is:
Using that how-to doc helps when you need to confirm both the name and structure of the smart values in a work item. Some simpler steps are:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Finally, I checked the Story Points field and there is only one of them in the Space and in my whole system. No one but me can add things like that. I am doing this in my sandbox though...would that make any difference?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would use the jiraDate format as it is unambiguous to set the value, thus the month and days cannot get confused / reversed.
Please note this is just for setting the value and has no impact upon the date formats displayed in Jira's UX.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, now I'm getting an error that says Story Points field not supported; The field with the id Story Points and type Story Points is not supported by Automation. However, I have used this field in several other automations, so I don't understand why it would say that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am unclear what you mean by "type Story Points". Please post an image of your complete rule and the audit log details showing that error.
Did you see my earlier question to check if there are multiple fields named "Story Points" within that project / space? That would certainly cause this symptom.
Another possible cause is trying to use Story Points on a sub-task work item type when the field has not been added to them. By default, sub-tasks do not use Story Points.
Another possible cause is if this is a Team-managed space / project, as those use the "Story Point estimate" field instead.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK, I started fresh. Not sure where that error about Story Points came from, but I don't have it anymore. I did see your question about multiple Story Points and answered above, but it got lost in all the conversation. I do not have multiple Story Points fields. I do have Story Points on my Subtasks, but at the moment, I'm only trying to create a task with start and due dates and story points. The latest run created the story points just fine, but I must still have issues with the smart values because neither start nor due date showed up. I'm attaching the May 20 flow, audit log, and task it created.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I recommend pausing and verbally explaining to another team member what you are trying to achieve. In my experience, doing that helps one slow down, consider what is observed versus expected, and may quickly reveal the solution.
As a reminder, smart values are case-sensitive...returning nothing when they do not match. And, the smart values you are using are incorrect. Let's do this step by step:
Please explain which date values you want in the new work items. For example, which of these apply:
Does your Scheduled trigger have JQL to supply a work item to the rule: yes or no?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK, I'm sorry...I think I've confused myself at this point. Here is what I'm trying to do.
Create a task every Monday that has a start date of the day it is created and a due date of the following Friday.
I had thought that {{now}} was the current date and time in the user's time zone, but I probably shouldn't do that since I'm in a different time zone than the rest of my team and I don't know if the Jira automation would be in my time zone or theirs. So, I was trying to just use the current day (time doesn't matter).
As for the scheduled trigger, I just want it to create a brand new task, so it shouldn't have to find a work item right? It does need to create the task within the Recurring Work Space...
Does this help?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome; that helps a lot! Assuming no time zone changes, the smart values would be:
For Start Date:
{{now.jiraDate}
For Due Date:
{{now.plusDays(4).jiraDate}}
If you wanted to increment by business days instead, use plusBusinessDays(4).
The default for {{now}} is UTC+00:00 so try no time zone adjustments first to check if it works as needed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yay! It worked and then I added a subtask in a branch and it worked too. I think it must have been my smart values (that were not very smart) all along! The only weird thing I see now is when I look at the audit log, it shows two tasks and two subtasks created, but they have the same number and I don't see two in the system. I'm not sure why it's showing them twice, but maybe that's a bug with the updates in the audit log. I attached a screenshot in case you want to check it out.
Thank you so much for all your help!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Whew; I am glad to learn it is working now!
For the audit log, I mentioned earlier the recent changes to the UX and logging may be causing those things. Keep a watch on it for a few days to confirm they are just log hiccups and not something else...and I will check the JAC backlog to see if anyone has posted this symptom yet.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.