I can't get the resurface date automation to work
Asked by John Strang:

I've tried to set up the resurface date automation shown by the Atlassian team and continually get an error. I follow the following steps exactly as they say. I saw one comment on their page from a user having a similar issue. Any idea what I'm missing here?

**"Automation 1 - Set resurface date.**

1. When an issue is set to one of your deferment statuses, populate the field you created with `{{now.plusDays(<days>).jiraDate}}`

   1. `now` gets today's date

   2. `.plusDays(90)` adds 90 days to today's date (for a 1 quarter deferment).

   3. `.jiraDate` converts that new date into a simple date format of `yyyy-mm-dd` which is easy to compare as a string.

   4. So if today is the 28th of August, 2023; `{{now.plusDays(2).jiraDate}}` would inject "2023-08-30" into the field.

      1. This would be the day we want the issue to be resurfaced for review."

**The error I get:**

##### [Edit issue](https://dripcom.atlassian.net/jira/polaris/projects/IDEAS/ideas/settings/automation#/rule/17000974/372346453) {#toc-hId--1505438225}

Unknown fields set during edit, they may be unavailable for the project/type. Check your custom field configuration. Fields ignored -  
Next Review Date (customfield_10173)  
No fields or field values to edit for issues (could be due to some field values not existing in a given project):  
IDEAS-8


Answers:
author: Katja Arendt
body: Hi John, I want to share my automation with you which works perfectly fine. Maybe it helps.

FYI I created that Automation directly in the JPD Project. The Field "Deferment Date" is a custom field I created in JPD as a short text field   
![Screenshot 2024-03-27 122030.png](https://community.atlassian.com/t5/image/serverpage/image-id/314794iA0FFB3D397BE6F28/image-size/large?v=v2&px=999 "Screenshot 2024-03-27 122030.png")  

I use the "easy" edit issue action:

![Screenshot 2024-03-27 122147.png](https://community.atlassian.com/t5/image/serverpage/image-id/314795i10CF2BFC32F3E465/image-size/large?v=v2&px=999 "Screenshot 2024-03-27 122147.png")

the further if JQL Actions you can ignore


author: Nick H
body: Hi [@John Strang](/t5/user/viewprofilepage/user-id/5386899) ,

I think the error / issue has to do with JPD date-fields in general.

Essentially, these date fields within JPD are *actually* a date range field, and the range is expressed with a start and end value, in the format of:

```
{"start":"yyyy-mm-dd","end":"yyyy-mm-dd"}
```

The automation below worked as expected to set a JPD date-field (customfield_10087) 90 days in the future when another JPD field was edited (Roadmap value edited to "Someday"):

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

With the JSON above being:

```
{
"fields": {
"customfield_00000":"{\"start\":\"{{now.plusDays(90).jiraDate}}\",\"end\":\"{{now.plusDays(90).jiradate}}\"}"
}
}
```

The automation does not have any field selected in the third step as the JSON will manage which field to edit.

Hope that helps!


author: Hermance NDounga
body: Hello John,

Could you please open a ticket with our support engineers so they can investigate directly in your site?

You can create a new ticket here : <https://support.atlassian.com/contact/>

Best Regards,  
Hermance  
Product Manager @ Jira Product Discovery

comments: author: John Strang
body: Thanks, Hermance. Unfortunately, I'm unable to submit a ticket because I'm on the free version until we can validate this as a new option for the team to use moving forward.


author: Hermance NDounga
body: You can open a ticket even if you are on a free version, worst case you can do it via the product by clicking on "Give feedback" (bottom left side bar) and then select the support team


author: Chris Timms
body: Hey [@John Strang](/t5/user/viewprofilepage/user-id/5386899)

Are you trying to use this rule within a JPD project? It is worth noting that JPD projects utilise a date field with a totally different syntax to 'standard' Jira date fields so without modification your rule is unlikely to work at all.

That being said, it appears you are having another issue here. That error is telling you that customfield_10173 doesn't exist in your project. Have you checked using the API that customfield_10173 is the ID of your Next Review Date field?

Regards,

comments: author: John Strang
body: Yes, I am doing this within the JPD project and the field is a free text field. I'm just following the steps that the Jira team put in part 3 of [this article.](https://community.atlassian.com/t5/Jira-Product-Discovery-articles/How-one-team-in-Atlassian-uses-Jira-Product-Discovery/ba-p/2452156)

I have checked and it is the correct ID.


author: Trudy Claspill
body: Hello [@John Strang](/t5/user/viewprofilepage/user-id/5386899)

Welcome to the Atlassian community.

Can you please show us your entire automation rule, and the details of the step where you are trying to set this field?

For the same issue, are you able to manually edit that same field through the UI? Does the field appear in the issue details for the same issue for which the rule is running?

Who is the Actor for the rule?

comments: author: John Strang
body: Hi Trudy,

I can edit the field through the UI manually. Based on the error, it feels like maybe there is a bug rather than something being done wrong.

The automation is pretty simple with a status change causing the custom free text field to receive the code in the image. I was just following the steps from the [Jira Article.](https://community.atlassian.com/t5/Jira-Product-Discovery-articles/How-one-team-in-Atlassian-uses-Jira-Product-Discovery/ba-p/2452156)

![Screenshot 2023-12-15 at 4.16.08 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/297081i4F6C9983377E0ADB/image-size/large?v=v2&px=999 "Screenshot 2023-12-15 at 4.16.08 PM.png")