Automation for Rating field fails

Deleted user January 8, 2024

I have been trying to setup automation to set the value of a Rating field to "3". When creating the rule, the field is not found, so I'm creating an advanced update of the issue.

Screenshot 2024-01-08 at 17.15.51.png

And then using the following rule, and I tried with value to be "3" and 3.

{
"fields": {
"Urgency": {
"value": 3
}
}
}

It provides the following error log:

Screenshot 2024-01-08 at 17.15.14.png

So I tried to find this custom field in administrator view, but this field is not possible to locate in https://<domain>.atlassian.net/secure/admin/ViewCustomFields.jspa

My conclusion is that the value is something else than just a value, but I cannot find the field to figure out the structure, so I'm screaming for help :)

Any ideas?

2 answers

2 votes
Deleted user January 9, 2024

The final solution includes what @Nick Haller stated in the below post, but to make it more condensed, I make a summary.

Step 1: In the Edit field rule, use the custom field ID, not the name. Find info about how to find custom field name here.

{
"fields": {
"customfield_10083": 3 # replace with your custom field id!!
}
}

Step 2: Assure the Automation for Jira user have permission to perform automation in your JIRA Discovery project. It was not possible to do by me as JIRA administrator, so JIRA support team made the changes for me. So if your rule does not work after setting the rule as per the above, contact JIRA support to correct the Automation for Jira user permissions.

Kevin Gough
Contributor
July 23, 2024

Hi @[deleted] @Nick Haller 

I'm trying to achieve the same thing but this isn't working for me at all despite following the steps.

1. Found the field ID for Impact using the issue navigator.

Screenshot 2024-07-23 143859.jpg 

 

2. Created the rule using the same JSON as you.

Screenshot 2024-07-23 143826.jpg

 

3. Keep getting errors in the Audit log

Screenshot 2024-07-23 143617.png

 

4. Tried with another rating field and a slider field as I want to create automations for them too but same results.

 

5. Fairly certain Automation for Jira has permissions on the Discovery project as its executed other rules in the past.

Screenshot 2024-07-23 144655.jpg

 

Any ideas why this is not working and what I could be doing wrong?

Thanks,

Kevin

Nick Haller
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 23, 2024

Hi @Kevin Gough ,

Your rule appears to be configured correctly - so my guess is your A4J (Automation 4 Jira) user does not have JPD permissions based on that error, and what other customers have reported. 

Please open a ticket with JPD support HERE or in JPD through the Give Feedback tab >> Get help from the support team option.

We on the Atlassian support team can get this user enabled / the correct permissions. Unfortunately this cannot be controlled from the customer's side.

Kevin Gough
Contributor
July 23, 2024

Hi @Nick Haller 

Appreciate the feedback, used the Give Feedback tab >> Get help from the support team option so hopefully they can sort me out soon.

Thanks,

Kevin

Like Nick Haller likes this
1 vote
Nick Haller
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 8, 2024

Hi @[deleted] ,

The Urgency field is system field that I believe is not available for JPD out-of-the-box, like it can be selected for other Jira projects.

I was able to test successfully with a similar automation, and a custom Urgency (single-select) field with this type of rule:

urgency1.jpg

urgency2.jpg

 

In the example above, customfield_10210 is my custom Urgency (single-select) field. You should be able to find a field's ID by following this doc: How to find any custom field's IDs

One difference I noticed between our rules is the value ("L3") in my rule is surrounded by quotations while yours (3) is not.

We've also noticed that error related to the Automation-user, and it not having permission to perform actions for JPD. If after adjusting your JSON body to include quotations and the error persists, feel free to open a ticket with JPD support and we'll take a deeper look into the issue.

Deleted user January 8, 2024

Hi @Nick Haller 

The field is not of type Urgency, it is a "Rating field". And I cannot figure out what value options that field have, and I think that is the cause of the problem. I have tried "3" and 3. According to the documentation the field have value from 1 to 5.

Screenshot 2024-01-08 at 17.54.01.png

Nick Haller
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 8, 2024

Hi @[deleted] ,

Thank you for the additional information. The format of a rating field is actually a number so to your point, quotations would not be needed. 

After an additional test with a similar custom field, I was able to get my automation working as expected with a body like this:

urgency 3.jpg

urgency4.jpg

 

Where:

  • customfield_10263 = Urgency 2.0 (custom rating field)
  • JSON body is:
{
"fields": {
"customfield_10263": 5
}
}

 

Hope that helps! 

Nick Haller
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 8, 2024

Hi @[deleted] ,

Thank you for the additional information. To your point, a Rating field is a number field and does not need quotations like a value might.

I was able to test with a similar custom-Rating field, and adjust my automation's JSON body to get this working as expected:

urgency 3.jpgurgency4.jpg

 

Where:

  • customfield_10263 = Urgency 2.0 (custom-Rating field)
  • adjusted JSON body:
{
"fields": {
"customfield_10263": 5
}
}

 

Hope that helps! If you continue facing the same error, feel free to reach out to JPD support.

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events