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?
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
{{issue.customfield_10236.match(".*start\":\"(.*)\",.*")}}
{{varProjectTargetDate.toDate.minusMonths(2).jiraDate}}
{
"fields" : {
"customfield_10235" : "{\"start\":\"{{varProjectStartDate}}\",\"end\":\"{{varProjectStartDate}}\"}"
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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" ] }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please enter an exact issue key for that to work in the REST API call, such as:
TNCRM-1234
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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):
A date time in ISO 8601 'YYYY-MM-DDThh:mm:ss.sTZD' format.
1
"customfield_11442" : "2015-11-18T14:39:00.000+1100"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
Test #2:
Test #3:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Even when I tried the method from your edited post, I still get the same error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dick,
there is no Screens option in the Project Settings window in Jira Product Discovery.
And as I said before there is no screen scheme assigned to this project in Settings - Issues - Screens - Issue Type Screen Schemes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.