Hi all,
I've been asked to create a load based automation slightly different from the load based one that Atlassian currently offers.
Basically, the user wants the tickets to have a "weight" based on a field that they enter, called "complexity".
Weights are 1,3,5,etc.
They would also like the automation to not assign tickets to users if their ticket load is over 30.
I've been messing with jira smart values and jql summaries for a bit and was wondering what the best way to do this would be.
I'm currently stuck with a lookup table to reference all of the jql for the first user
the value is {{assignee = (firstuserid) AND "Complexity[Dropdown]" = Complex}}
This is the jql query that will tally how many work item issues are assigned to each user based on complexity, so that I can do the math for the weight load with it and not assign it to the user if the weight is above 30.
I've tested it to comment on the work item, but it says that the value is empty.
I've also tried it with the raw JQL but it just returns the string of the actual JQL instead (assignee = (firstuserid) AND "Complexity[Dropdown]" = Complex)
I think the jql I'm putting in might be wrong or might not be able to be parsed by the lookup table, but any help is appreciated thank you!
Hi @Evan Kaung -- Welcome to the Atlassian Community!
Without seeing your entire rule for context...I am not following how you are trying to use the Lookup Table.
When a Lookup Table is created, the Keys are static values and the Values can be static or dynamically determined at the time the table is created. The Values must also use valid smart value (or plain text) syntax. The syntax you are trying to set the table row's Values is both incorrect for a conditional expression and likely not what you seem to be describing.
Please show an image of your complete rule, in one single continuous image, and perhaps explain your scenario with an example work item and how the rule would process that. Those will provide more context for the community to help.
Kind regards,
Bill
Hey Bill,
Basically when the field "Complexity" changes value (manually by a user), and the issue is unassigned, the lookup table will automatically grab all of the agent's tickets and then see if the weight is over a number, at which point they will be assigned a ticket or not.
Right now it's just in a testing phase right now so it'll just leave a comment-
In the lookup table I'm trying to get the number of tickets that a user has been assigned with the complexity of a specific value. So for instance, assigned to John Smith and then a complexity of "complex" as an int.
Once that's done I'll do math with it to calculate the weight of the tickets to see if the user can be assigned a ticket or not but right now I'm a bit stumped on how to grab the number of tickets with that field assigned to the user with the conditional expressions on the table as it seems like it only does true/false statements.
Best regards,
Evan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The values for your Lookup Table are incorrect: they cannot dynamically lookup work items (formerly called "issues") for a user when the table is created. Instead...
To get the work items assigned to the person who triggered the rule, first use the Lookup Issues action with JQL. For example:
Then create your lookup table to count the values in the Complexity field for that user's work items, using the match() function to find them and the size function to count the matches.
Assuming the field's smart value is "complexity" and it is single-select, this would work.
Finally, use the table to get the counts for the trigger's issues Complexity value:
{{varIssueCountByComplexity.get(triggerIssue.complexity.value)}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Evan Kaung , Welcome to the Atlassian Community!
I'm assuming that your complexity field is a select field for this case. This way, here how you need to use the lookupTable resource in the correct way.
Considering your table is called {{userIssues}}, your smartvalue to get the value considering the complexity reference should be: {{userIssues.get(issue.customfield_XXXX.value)}}
Change XXXX for the correct ID for the complexity field.
Using this you will able to get the value considering complexity reference.
Hope this helps you :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Fernando,
Thanks for the help!
In this case I would need to grab the number of issues assigned to a specific user with that field being a specific value. Is there any way I can do this with smart values?
Looking at the documentation linked by Bill I can only see true/false conditional logic.
Best regards,
Evan
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.