Where is your list of values?
For example, if you have a comma-separated list of values in a field, you may convert those into a list and find the maximum using list functions: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/
{{issue.yourFieldName.split(",").max}}
Kind regards,
Bill
To determine the maximum value from a number series in a Jira automation rule, you'll need to make use of smart values and conditional logic.
However, Jira automation doesn't inherently support calculations like finding the max value from a series of numbers. But there are ways to get around it based on specific use cases. Here's a general approach that you could consider:
1. Using Jira Automation: Jira's automation capabilities do not provide direct functionality to process an array of numbers and extract a maximum value. Instead, you'd have to use conditional statements for known potential values. This is a bit clunky and not scalable.
2. Using a Script: If you are using apps like ScriptRunner for Jira, it becomes straightforward. You can create a custom script to get the max value from a series of numbers. For instance, in Groovy (used by ScriptRunner):
groovy def numbers = [1, 3, 5, 4]
return numbers.max()
3. Utilizing External Tools: Depending on your exact requirements, another option might be to process the data externally (e.g., by sending the data to an AWS Lambda function, processing it there, and sending back the result to Jira).
4. Manual Entry: If you're working with a limited set of values (as in your example), and you know these values won't change often, you can set up a rule with conditions to check each number and determine the maximum.
However, this is not efficient for a larger set of numbers. Remember, how you approach this largely depends on your specific requirements, the tools you have at hand, and the flexibility you require in your Jira instance. If you could provide more context on where these numbers are coming from and how they're used in your Jira automation, I could potentially offer a more tailored solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
jira automation has 5 variables, the first 4 variables each have the value 1,2,3,4 and the last variable takes the highest value of 1 of the first 4 variables
You can see the image below
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @THƠ NGUYỄN VĂN
You can use "If/else" condition in your automation and use JQL to filter your requirement and in action item you can select edit issue and add value accordingly.
For Example:
Condition : if(Finance> "progress and Quality" and Finance > "Reputation and creditability" and Finance > "Resources")
Action Item: Edit Issue --> copy Finance value to Impact Level
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.
@THƠ NGUYỄN VĂN
Great Please accept answer as it resolves your query.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I resolution it as below @@
{{#=}}MAX(1,2,3,4){{/}} // log is: 4
Hope it will help anyone who needs it
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.