JPD - Automation: Change "Project start" when "Project target" is updated (Date field - error)

Damian Trutkowski January 31, 2025

Jira Product Discovery.

I want to create an automation rule that updates the Project start field whenever the Project target field changes. However, I get the following error:

"Edited issue successfully, however some of the set fields aren't available. Fields ignored:
Project start (customfield_10235)
Unable to find any issue field values to edit: TNCRM-85"

The Project start field exists in my project, and I can see it in the issue view.

I have attached screenshots with all the necessary details.

How can I resolve this issue?

Zrzut ekranu 2025-01-31 121730.pngZrzut ekranu 2025-01-31 121711.pngZrzut ekranu 2025-01-31 114907.pngZrzut ekranu 2025-01-31 114856.pngZrzut ekranu 2025-01-31 123121.png

2 answers

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 31, 2025

Hi @Damian Trutkowski -- Welcome to the Atlassian Community!

Please note for JPD project rules involving their date fields:

As you see, JPD uses its own, text-based "date" values.  These can represent a single date, a date range, a month, quarter, or year.  As both of your fields appear to be JPD "date" fields, they can be copied directly (one to another) or they must be parsed to extract / convert the text to a date-type for any increment / decrements, and then repackaged back into the text-based format.

Only JPD users with creator permission can change most of the Idea fields.  If your rule actor does not have creator permission, the changes cannot be made.  This is a known problem (i.e., design choice caused by the licensing model) with the default Automation for Jira user in JPD rules.  The solution is to change the rule actor to a JPD user with creator permission...although that may cause other problems / symptoms, so ensure you test fully.

Kind regards,
Bill

Damian Trutkowski February 3, 2025

Hi Bill,

thank you for your answer. I have creator permission and even when trying to copie value straight away from Project target to Project start field it doesn't work.

 

 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 3, 2025

Please post an image of your complete rule (in one single image) and an image showing the complete edit issue action where the field change is attempted.

Damian Trutkowski February 4, 2025

Hello Bill,

please find screenshoots below.

Zrzut ekranu 2025-02-04 173855.pngZrzut ekranu 2025-02-04 174241.pngZrzut ekranu 2025-02-04 174252.png

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 4, 2025

Interesting, as those should be the same format to allow the copying directly.

Let's try JSON again, forcing the format to exactly what is needed...however, we will first extract and pre-calculate the expression as variables to exclude any possible timing / racetrack errors for the evaluation:

  • action: create variable
    • name: varProjectTargetDate
    • value:
{{issue.customfield_10236.match(".*start\":\"(.*)\",.*")}}
  • action: create variable
    • name: varProjectStartDate
    • value:
{{varProjectTargetDate.toDate.minusMonths(2).jiraDate}}
  • action: edit issue, using this as the JSON
{
"fields" : {
"customfield_10235" : "{\"start\":\"{{varProjectStartDate}}\",\"end\":\"{{varProjectStartDate}}\"}"
}
}

 

Damian Trutkowski February 5, 2025

Hi @Bill Sheboy ,

thank you for your instructions and for taking the time to help me.

I followed your steps and below are the screenshots showing the results.

Zrzut ekranu 2025-02-05 133749.pngZrzut ekranu 2025-02-05 133808.png

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 5, 2025

Thanks for trying those actions.  Let's try to eliminate a few other possible causes.

 

Using this how-to article to identify smart values / custom fields supported by rules, use an example issue to check if your fields are available: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/

 

If the fields are both supported, let's fully confirm the JSON is not the problem:

  • create another variable, named varJSON, setting its value to what you are using as the dynamic JSON
  • write that {{varJSON}} to the audit log to confirm it contains what we expect
  • in the Edit issue action, replace the JSON with {{varJSON}}
  • re-test and post what you see in the audit log

 

Damian Trutkowski February 6, 2025

Hi Bill, 

I'm unable to check this because when I enter:
https://XXX.atlassian.net/rest/api/2/issue/TNCRM?expand=names
I get an error message.

Zrzut ekranu 2025-02-06 131557.png

It seems that Jira does not treat a project in Jira Product Discovery the same way as an issue in the Jira environment.

 

When searching for information via:
https://XXX.atlassian.net/rest/api/3/issue/createmeta?projectKeys=TNCRM&expand=projects.issuetypes.fields
I can see that the set operation is available for this field, so I have no idea why the automation isn't working for it.

"customfield_10235": { 
"required": false,
"schema": {
"type": "string",
"custom": "jira.polaris:interval",
"customId": 10235 },
"name": "Project start",
"key": "customfield_10235",
"hasDefaultValue": false,
"operations": [ "set" ] }

 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 6, 2025

Please enter an exact issue key for that to work in the REST API call, such as:

TNCRM-1234

 

0 votes
Dick
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 31, 2025

Hi @Damian Trutkowski Welcome to the Atlassian Community.

I believe that the syntax of the JSON fields command is not okay. Typical examples are given on the Atlassian advanced editing page . Any string on that page can be replaced using {{smart values}} documented on the Atlassian smart values page

you need to put the new date into a variable, because it's more clear than to use the customfield_10236 value for that and storage of a new value. 

your basic format should be like:

{

"fields": {

      "customfield_10235": "newdate", 

      "customfield_10236": "stored date value"

      }

}

with the dates following the described format (depends on you definiition of the custom fields):

 

Date time picker custom field

A date time in ISO 8601 'YYYY-MM-DDThh:mm:ss.sTZD' format.

1 "customfield_11442" : "2015-11-18T14:39:00.000+1100"
Damian Trutkowski January 31, 2025

Hi @Dick ,

thanks for your prompt response.

I followed your recommendations and tested three different configurations based on the Atlassian advanced editing page and smart values documentation. Unfortunately, I still encountered issues.

I’ve attached screenshots showing the results for each attempt. Let me know if you see anything that might be causing the problem.


Test #1:
Zrzut ekranu 2025-01-31 131201.pngZrzut ekranu 2025-01-31 131149.png

Test #2:

Zrzut ekranu 2025-01-31 131741.pngZrzut ekranu 2025-01-31 131731.png

Test #3:

Zrzut ekranu 2025-01-31 131523.pngZrzut ekranu 2025-01-31 131511.png

Damian Trutkowski January 31, 2025

Even when I tried the method from your edited post, I still get the same error.

Zrzut ekranu 2025-01-31 133227.pngZrzut ekranu 2025-01-31 133218.png

Dick
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 31, 2025

Hi @Damian Trutkowski 

I believe all need the .asJsonString suffix to make a string out of an object definition. This is documented on the top of the Atlassian Json functions page

Kind regards,

Dick

Dick
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 31, 2025

And from the last couple of errors you posted: make sure that the field is put into the edit screen scheme that is referenced in your issuetype screen scheme for the TNCRM project.

If it's not in the edit screen definition, you can try all you want, but Jira won't let you edit it.

Kind regards,

Dick

Damian Trutkowski January 31, 2025

Hi @Dick 

the problem is that I can't find any screens for TNCRM (Jira Discovery Product) in Issue → Screens, Screen Schemes, or Issue Type Screen Schemes.

How can I set it up in this case?

Dick
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 31, 2025

Hi @Damian Trutkowski 

There's three levels when concerning screens:

issue type screen scheme is coupled to your project

it holds the screen schemes for all the issuetypes 

which hold the screens for the different actions one can perform on an issue.

 

You want to find the issue type screen schema attached to your project first. 

Go to Project Settings and select Screens.
You end up looking at the Issue Type Screen Scheme right there. 

You also see the issue types that are "coupled" to the screen schemes, which can be opened using the > sign in front of them. 

Opening these up, you see the actions that each can have a different screen. There can be a screen for Create, edit and view.

 

You want to check if the edit action screen, for the issue type you're working on, holds the custom field. If it's not there, you can edit this screen and put it on there.

 

Kind regards,

Dick

 

Damian Trutkowski February 3, 2025

Hi Dick, 

 

there is no Screens option in the Project Settings window in Jira Product Discovery.

Zrzut ekranu 2025-02-03 164701.png

And as I said before there is no screen scheme assigned to this project in Settings - Issues - ScreensIssue Type Screen Schemes

 

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events