Hi!
I am searching all over this forum and the net and testing many things for 3 days to solve this challenge! BTW! I am the owner and of course admin of this project.
Story:
I want to write an Automation that when one of the subtask STory Point Estimate changed, the sum of all of them add to their parent (backlog) story point. Exactly like the following picture:
But I get this error message over and over:
My Script:
My Automation script and its Audit log:
{{issue.SubTasks.Story point estimate.sum}}
What did I do:
I encounter this QA here:
They suggest:
~~~~~~~~~
Navigate to the Project > Project settings > Permissions > check if the "atlassian-addons-project-access" is added to your project permission, especially in the "Edit issues" permission.
~~~~~~~~
But I do not have any Permission option in my Project Settings, So I search more and find this page:
https://support.atlassian.com/jira-cloud-administration/docs/manage-project-permissions/
Then I found Edit Issue permission in "Default Permission Scheme" and changed add Administrators to it like this:
But even after the above changed, still, I get the same error!
What did I miss here!!?
Thanks for your time in advance
Reza
Hi @Reza -- Welcome to the Atlassian Community!
Ignoring for a moment assigning story points to subtasks...
You appear to be using a Team-managed project, which uses the Story point estimate field, yet your rule action for editing the parent is trying to set Story points. The Story points field is used for Company-managed projects.
I recall that the Story point estimate field is not currently listed for the edit action's dropdown of fields, so instead you will need to use an advanced edit with JSON: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/
Kind regards,
Bill
Hi @[deleted]
Thanks so much for your suggestion. I removed all smart values from the simple field then tried these combinations in the advance box:
NOTE: Total is a variable that I store this smart value in it and test it in Debug to make sure it returns the right value too:
{{issue.SubTasks.Story point estimate.sum.round}}
{
"fields": {
"customfield_10028": {
"value": {{Total}}
}
}
}
Same error message
{
"fields": {
"customfield_10028": {
"value": {{issue.SubTasks.Story point estimate.sum.round}}
}
}
}
Same error message
{
"fields": {
"customfield_10028": {{Total}}
}
}
Same error message
{
"fields": {
"customfield_10028": {{issue.SubTasks.Story point estimate.sum.round}}
}
}
Same error message
{
"fields": {
"cStory Poitns": {{Total}}
}
}
Error message:
Additional fields contains invalid field(s) in 'update' or 'fields' section.
Story Points
Best Regards
Reza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please try this for your JSON, assuming the branch is on the parent issue:
{
"fields": {
"Story point estimate": {{issue.subtasks.Story point estimate.sum|0}}
}
}
Also please note that smart values are case and spacing sensitive, and the rule editor shows almost no errors when we enter these incorrectly. Instead it just treats them as null.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
WooooooooooooooooooW!!!! Finally! after 3 days!! lool
Thanks so much... It is working very well!
Before your suggestion, since I had another Project, I made that automation global, and now it is almost perfectly working on both of those projects. But while it is changing the parent Story Point with the sum of all subtasks correctly, still I get this warning for both Projects:
* Issues edited successfully
LIB-120
* Unknown fields set during edit, they may be unavailable for the project/type. Check your custom field configuration. Fields ignored -
Story Points (customfield_10028)
Why is that!?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And why we should set the value of calculation into "Story point estimate" and Not "Story Points" !?
Since our goal was to change the parent "Story Points" filed and was not the subtasks "Story point estimate" !?
Is it Backlog filed variable name for its "Story Points" Textbox actually is "Story point estimate"!?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I suggest looking at the project types, as it appears to be referencing the Story points field somewhere in the rule when the project type for the triggering issue is Team-managed...which only uses Story point estimate.
For whatever reason...when Team-managed (formerly called NextGen) projects were added they needed to create a new story point field, called Story point estimate, but in the UX they kept the name the same as "Story points" to avoid confusion. The specific field name is only relevant for JQL, REST API, and automation users. I suspect at some point in the future these will consolidate to one field with a single name...but who knows; I'm just a customer. :^)
Two more things to help...
When you are are unsure of the correct smart value/field name to use in a rule, please try the information in this how-to article: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
Next, you note making this rule global scope. What is your Jira Cloud license level? Different levels have different limits on the number of global/multi-project rules than can run each month: https://support.atlassian.com/jira-cloud-administration/docs/explore-jira-cloud-plans/ Please discuss this with your site admin to prevent running out of capacity for your rules.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If the static value method as @Mark Segal has mentioned works, then try to update your smart value like this:
{{issue.SubTasks.Story point estimate.sum.asNumber}}
It maybe that it's looking for a number and not text?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your suggestion. I actually use your smart value too and store it in a variable and try the script again, but failed!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Reza and welcome to the community!
Can you try a test where you set the parent's story point field to a static value (e.g. 5) just to see if that works?
If that works, you may want to capture the calculation in a variable and then apply the variable to the edit issue function.
If it doesn't work, there is definitely something still off in the overall config. Perhaps the field configuration or some weird properties applied to the workflow
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Another possibility is that your log is showing a decimal and story point is a whole number. You could try adding the round function to ensure it comes across as a whole number.
{{issue.SubTasks.Story point estimate.sum.round}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mark Segall Thanks so much for your fast reply. Since I am a beginner it takes a while to search for how to and test your suggestions and other friends.
Can you try a test where you set the parent's story point field to a static value (e.g. 5) just to see if that works?
No luck!
I changed parent Story Point and nothing happen (my trigger only set for "Story point estimate") then I changed one of the children's "Story point estimates" and the script run with the failed result again.
If that works, you may want to capture the calculation in a variable and then apply the variable to the edit issue function.
No luck!
While the previous suggestion didn't work, I created a variable and test that too. again failed!
If it doesn't work, there is definitely something still off in the overall config. Perhaps the field configuration or some weird properties applied to the workflow
Partially checked! No Luck
Actually, I add some new labels in Workflow, so I went there and remove them all and tested again and again failed!
{{issue.SubTasks.Story point estimate.sum.round}}
Used this trick too and even store it in a variable, but no luck!
Thank you so much for your time and suggestions.
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.