Automation Query - Error: No fields or field values to edit for issues
Asked by Karoline Rezende Ramos:

Hi guys.  

See if you can help me find this gap that I can't identify.

I have this automation with the function:  
Clone a change and the trigger is through a field...That is there is a button where users click on clone, when they clone they fill the value of the field to YES, but right after that there is an action in the automation that should return that value to NO, because they may want to clone more than 1 time the same change.

In all statuses the rule works fine, but when trying to clone in closed status it gives this error.

I know it is something permissions related, the rule author is Automation for Jira himself and in the workflow properties it is already with edit permission. I leave the evidence here for more details.  

![Screenshot_2.png](https://community.atlassian.com/t5/image/serverpage/image-id/231610iA76029C3860C1FC2/image-size/large?v=v2&px=999 "Screenshot_2.png")

Thanks.


Answers:
author: Trudy Claspill
body: [@Karoline Rezende Ramos](/t5/user/viewprofilepage/user-id/4342260)

In the Workflow Status Properties for the Closed status I see that you allow 3 user groups and 1 project role to edit issues in that status.

Is the "Automation for Jira" user a member of any of the specified groups? I expect not.

What Project Role has the ID 10002? If that is not the "atlassian-addons-project-access", then add another entry for that same property with the ID for that Role.

comments: author: Karoline Rezende Ramos
body: Excellent [@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011) !  
Thank you very much. Adding the roll ID "atlassian-addons-project-access"worked.


author: Kelly Arrey
body: Hi [@Karoline Rezende Ramos](/t5/user/viewprofilepage/user-id/4342260)  

Just a wild guess, but have you checked the \`jira-issue-editable\` property on the Closed status in the workflow? Here's a [**Jira KB article**](https://confluence.atlassian.com/jirakb/how-do-i-edit-closed-issues-779160787.html) about it. HTH,  

Kel

comments: author: Karoline Rezende Ramos
body: Hi [@Kelly Arrey](/t5/user/viewprofilepage/user-id/510430)   

Yes, there is no such property in the workflow in closed status.  
What I did was put some groups that have permission to edit in this status, more common user should not have this access, what properties do I have to put to get?  
I share the image as it is today, because it seems to me that the automation author is without permission, but shouldn't the automation for jira already be understood as admin?![Screenshot_6.png](https://community.atlassian.com/t5/image/serverpage/image-id/231774iC12A56744B210867/image-size/large?v=v2&px=999 "Screenshot_6.png")


author: Karoline Rezende Ramos
body: [@Choquevillca Morales Lorena](/t5/user/viewprofilepage/user-id/4760713)  

I saw a forum that you were able to help.  
I followed those steps for my case did not work, have any idea what it might be?


author: Choquevillca Morales Lorena
body: [@Trudy Claspill](/t5/user/viewprofilepage/user-id/3569011)


author: Darryl Lee
body: Hey [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) - I had to scroll down in [@Karoline Rezende Ramos](/t5/user/viewprofilepage/user-id/4342260)'s original screenshot to spot the extra edit down there at the bottom:

![missingedit.png](https://community.atlassian.com/t5/image/serverpage/image-id/231686i4E597416721F9F6E/image-dimensions/260x666?v=v2 "missingedit.png")

[@Karoline Rezende Ramos](/t5/user/viewprofilepage/user-id/4342260) I think you're getting the error because this Edit issue field needs to be dragged beneath the "Add comment" block so it is within the "For All created issues".

The error you're getting is because the Automation is trying to update **scope_change**on a closed issue. Normally closed issues cannot be edited.

comments: author: Vamsi Kandala
body: Hi [@Darryl Lee](/t5/user/viewprofilepage/user-id/1365322),

Per my understanding, [@Karoline Rezende Ramos](/t5/user/viewprofilepage/user-id/4342260) is trying to do the same thing as expected in the automation rule.

If I am not wrong, the flow of changes is:

* User changes the 'scope_change' value in the ticket to 'YES'
* Clone this ticket
  * Edit request type in the cloned ticket
  * Add comment in the clone ticket
* Edit the 'scope_change' value in the original ticket back to 'NO'

I assume the 'scope_change' is already part of the 'Edit' screen as otherwise the user will not be able to update this field in the first place.

I have checked that it is possible to update the closed tickets in most cases unless the property is set otherwise.

I am trying recreate the scenario and test.

Thanks,  
Vamsi


author: Darryl Lee
body: Ah [@Vamsi Kandala](/t5/user/viewprofilepage/user-id/4392782) I didn't read the original post clearly enough. You're absolutely right.   

Hm yeah now I'm interested to see what the problem is.


author: Karoline Rezende Ramos
body: Hello [@Darryl Lee](/t5/user/viewprofilepage/user-id/1365322) [@Vamsi Kandala](/t5/user/viewprofilepage/user-id/4392782)

First thanks for the comments.

This is exactly what happens.  
1. The person uses a button, provided in the clone issue.  
2. When he uses this button, I added a post function to change this field to YES (Trigger of the rule)  
3. Automation creates the cloned issue and links it to the original ticket.  
4. The action in automation edit: You would have to change the value of the "scope_change" field to NO (where it is showing the mentioned error)

Because if it is set to YES people can't clone this issue anymore. I don't know if it was clearer.  

Thank you.


author: Vamsi Kandala
body: Hi [@Karoline Rezende Ramos](/t5/user/viewprofilepage/user-id/4342260)

Don't mind me asking this.

If you are allowing the users to clone the same issue multiple times, is it not better to just clone the issues directly without checking for whether the 'scope_change' value is changed to 'YES' and trying to change it back to 'NO'?

Thanks,  
Vamsi


author: Karoline Rezende Ramos
body: Hi [@Vamsi Kandala](/t5/user/viewprofilepage/user-id/4392782)   

We have some different conditions and needs, this rule allows to clone a change management, there are people who open weekly, monthly and the body of the change is the same, so we provide this feature, and the trigger we use following the best practices is by changing a field.  
In our instance we already have some automations, and we are avoiding using the same trigger, because we already had an incident of delay in execution and according to Atlassian's support we should do it this way.


author: Vamsi Kandala
body: Hi [@Karoline Rezende Ramos](/t5/user/viewprofilepage/user-id/4342260)

Understood. Thank you for explaining.

Regards,  
Vamsi


author: Bill Sheboy
body: Hi [@Karoline Rezende Ramos](/t5/user/viewprofilepage/user-id/4342260)

I have observed that error when the custom field is not on the edit view, the custom field is different type/value (such as for team-managed or multi-project rules), the rule actor does not have permissions for edit, and when the issues have been made read-only.

Would you please post an image showing the audit log details when the rule works as expected for an issue clone? That may eliminate some of the possibilities.

Kind regards,  
Bill

comments: author: Karoline Rezende Ramos
body: Hello [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313)  
Thank you in advance for your attention.  
Sure you can...Here is a printout when successfully executed. See:  

![Screenshot_4.png](https://community.atlassian.com/t5/image/serverpage/image-id/231638i200FD5C03125CD07/image-size/large?v=v2&px=999 "Screenshot_4.png")


author: Bill Sheboy
body: It appears the rule was changed today, after the successful run on 9 December. After that point it appears to be failing. Do you know what was changed?


author: Karoline Rezende Ramos
body: There was no change in the rule. The only thing I noticed different is that it only happens when you try to clone a change in the closed status, when cloning the other statuses it works fine.  
But in the workflow there is no edit block.

![Screenshot_5.png](https://community.atlassian.com/t5/image/serverpage/image-id/231640i7F8CA9A7CB66E95C/image-size/large?v=v2&px=999 "Screenshot_5.png")


author: Bill Sheboy
body: Are you showing the entire rule in the screen image?

I ask this question because the log details showing the failure show that the Edit Issue Fields action is *after the if/else conditions and inside the same level*. So that edit could not be the one which is failing.

There must be another Edit Issue Fields later in the rule which is failing.