JIRA Automation: Problem with Custom Field (Date Picker) that is being ignored
Asked by Gonzalo Perez Alonso:

I have set up an automation in JIRA that works as follows:

1. WHEN: Issue transitions from (in progress, resolved, reopened and/or opened) to (closed).
2. IF: Issue type is one of (task, sub-task, story and/or bug)
3. THEN: Edit issue field (Custom field date picker) using the following smart value: {{now.jiraDate}}

When I tested the automation, the custom field wasn't modified. When consulting the audit log, it shows that the issue met the conditions (so steps 1 and 2 are properly programmed) but when performing the edit action (step 3), no edit was made. JIRA suggests 2 possible reasons:

* No fields or field values to edit for issues (could be due to some field values not existing in a given project) - not the case, as I already checked the custom field is included within the screens of the project.
* Unknown fields set during edit, they may be unavailable for the project/type. Check your custom field configuration - neither the case, as this custom field is configured to be available for all projects in our instance.

At this point I'm stuck and I don't know how to proceed - any ideas? Thanks a lot in advance!


Answers:
author: Tim Kopperud
body: Hi [@Gonzalo Perez Alonso](/t5/user/viewprofilepage/user-id/5365999), welcome to Atlassian Coomunity, nice to see you here.

I'm not able to reproduce this problem, as you see here.

#### The rule {#toc-hId-289538221}

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

#### The result in history log {#toc-hId--1517916242}

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

As you see by the yellow markings the **My date** field was not visibly updated during the rule execution itself (first yellow marking), but it shows changed in the issue itself (second yellow marking).

Just so I understand the exact problem for further investigation. Is the variance mentioned above (rule update ves history update) related to your problem, or is it that the field isn't even updated in the issue history?

It might be helpfull if you are able to attach images of the rule and of the issue history (like in my example above).

TimK.

comments: author: Gonzalo Perez Alonso
body: Hi [@Tim Kopperud](/t5/user/viewprofilepage/user-id/492874)

Thanks for the quick response. The main problem I'm facing is that my custom field (E2E Close Date) is not being edited as I want to.

Please find attached screenshots both for the automation and the audit log.

![000057.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/292037i20344CB0244E4BF7/image-size/large?v=v2&px=999 "000057.jpg")

![000056.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/292036iD7335CA6964D22EC/image-dimensions/403x257?v=v2 "000056.jpg")


author: Tim Kopperud
body: Hi [@Gonzalo Perez Alonso](/t5/user/viewprofilepage/user-id/5365999)

Do you see the field **E2E - Close Date** on the issue **BET-9** itself? Are you able to set the field manually from that issue?

Though a field doesn't actually need to be included in any screens to be set, lack of seeing the field can be an indication of a context problem. Try check your custom field context

1. Press the **Cog icon** (upper right corner) and select -\> **Issues** -\> **Custom fields**
2. Find the field**E2E - Close Date**
3. Press the **Ellipsis** menu to the right and select **Context and default value**

Confirm that the project **BET** and the issue types **Tasks** , **Story** , **Bug** and **Sub-tasks** are included in the applicable context.

If it states **Global (all issues)** the project BET and the issues types are included (global context is not reccomended though so it might be a narrower scope in your setup).

The image below shows an example of the global context configuration.

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

You might attach an image of your context configuration if you're uncertain.

TimK.


author: Gonzalo Perez Alonso
body: Hi again,

Thanks for the clarifications but I had already checked that. I even run the "where is my field" diagnosis and everything seems correct (see the screenshot below)

Also, the field is being shown on the test issue. The problem is that the automation is not being done, as it doesn't get updated when I transition to Close status.

![000058.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/292045iDA78F13BEF23ACDD/image-dimensions/445x405?v=v2 "000058.jpg")


author: Tim Kopperud
body: Hi [@Gonzalo Perez Alonso](/t5/user/viewprofilepage/user-id/5365999).

1:  
Have you confirmed that the user executing the rule has **Edit** permission on the issue?

2:  
This is probably not the reason, but can you check if any edit restrictions are set on the **Close** status in your workflow? If the user executing the rule can manually edit the issue it is not set any edit restrictions.

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

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

3:  
You might also test if the rule works with another user as the **Actor** , e.g. yourself.

TimK


author: Gonzalo Perez Alonso
body: Hey [@Tim Kopperud](/t5/user/viewprofilepage/user-id/492874)

According to your first point, I also checked i had full edit permissions on the issue - please see the screenshot:

![000059.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/292098i6674294F2E159460/image-size/large?v=v2&px=999 "000059.jpg")

Regarding any possible restrictions, I haven't seen anything particularly noticeable on the transition that goes from Opened to Closed status in the workflow.


author: Gonzalo Perez Alonso
body: Here's the screenshot showing the prior restrictions, sorry:

![000061.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/292101iA6C061B8F06C9471/image-size/large?v=v2&px=999 "000061.jpg")


author: Tim Kopperud
body: Hi [@Gonzalo Perez Alonso](/t5/user/viewprofilepage/user-id/5365999), I was thinking of the **Status** properties for closed, not the Transition properties. See my first image in my last comment. Select the **Closed** ++status++ and press properties.

Also, when you say you have full edit permission, does the rule execute as you as the **Actor**?

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

TimK


author: Gonzalo Perez Alonso
body: Oh, sorry for the missunderstanding!

Here's the screenshot with the Closed status properties:

![000064.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/292123i7AB93EA18AFF7556/image-size/large?v=v2&px=999 "000064.jpg")

Maybe that jira.issue.editable should be in true, to let the automation work?

And here's the screenshot showing that I'm the actor of the automation:

![000063.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/292124i0E1496591BFB6668/image-dimensions/314x96?v=v2 "000063.jpg")


author: Tim Kopperud
body: Hi [@Gonzalo Perez Alonso](/t5/user/viewprofilepage/user-id/5365999)

Your status **Closed** has been locked for editing. That's why the rule won't set the date.

This image shows that edit is disabled on the status.

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

If **jira.issue.editable** is set to **false** no one will be able to edit the issue.

ONe option is to remove the property, but notice it has been added by a Jira admin on your instance, so the reason for having it should be understood before removing it.

Or you can add a new property to grant the rule actor edit permissions on the issue and still deny all other users. Have a [look at this article](https://www.j-tricks.com/tutorials/permissions-based-on-workflow-status).

TimK.


author: Gonzalo Perez Alonso
body: Nice! So we finally got to the root cause.

Thanks a lot! I will have a look at the article and then think about the best solution.

Have a good day!


author: Gonzalo Perez Alonso
body: Hi again [@Tim Kopperud](/t5/user/viewprofilepage/user-id/492874)

I've tried both changing the jira.issue.editable to "true" and creating a new property called jira.issue.editable.goperez, but none of those are working.

I've tested the automation with these modifications and still the field is not being updated.

Any clue on that?


author: Tim Kopperud
body: Hi [@Gonzalo Perez Alonso](/t5/user/viewprofilepage/user-id/5365999), since you have now adjusted existing status properties I might suggest that you start without any permission properties at all. Instead of **true** for **jira.issue.editable**, you can delete it. It's easier to start out simpler, and add feature in the next step.

Have you also confirmed that the rule **Actor** has been granted edit permissions in the permissions scheme?

TimK.


author: Gonzalo Perez Alonso
body: Sure! Before going for jira.issue.editable=true, I tried as well removing the property and leaving everything blank. Nothing happened.

According to your 2nd question, the rule actor (myself) has full permissions on edit, I've already checked that.


author: Gonzalo Perez Alonso
body: Hi again,

I finally managed to set the automation. **The only thing I changed was the smart value from {{now.jiraDate}} to {{now}}** - it's weird because everything worked despite:

1. That's the initial smart value - {{now}} - I used when I first set up the automation and wasn't working.
2. The Closed status property remains unchanged - it's still with jira.issue.editable=false.

Everything is working now fine but it's still a mistery how this automation can work, even with a property that doesn't allow to change the issue - maybe the automations get excluded from this properties? Idk.

Anyway, thanks a lot for the support!


author: Tim Kopperud
body: ~~Hi [@Gonzalo Perez Alonso](https://community.atlassian.com/t5/user/viewprofilepage/user-id/5365999), sorry but it seems I was wrong regarding the field doesn't need to be included on the screen.~~

~~The field need to be on the screen associated with the action. Can you confirm the field is associated with the Edit screen?~~

**EDIT**

Hi [@Gonzalo Perez Alonso](/t5/user/viewprofilepage/user-id/5365999), great. Good you got it working.

TimK.


author: Gonzalo Perez Alonso
body: It is - the custom field is within all screens related to my test project.

**EDIT**

Thanks a lot for the support [@Tim Kopperud](/t5/user/viewprofilepage/user-id/492874) - have a good day!