Appreciate any help the community can give me.
I'm trying to do something that is seemingly simple. I want to automatically convert a string to a number. I have a custom field with data type of string called "Dev estimate" and I want to edit the Story Point field which is of type number. Unfortunately, it is both successful and not producing any results (namely, converting a string to a numeric).
Here is a screenshot of the automation:
Hi @[deleted]
Some ideas to try:
Best regards,
Bill
Hi @Bill Sheboy
Thanks for your quick response. See below...
If you have any other ideas, I'll take 'em.
Thanks again, Bill!
Tim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tim,
Thanks for the detailed answers! By the way, I should have sent this link before that has a how-to for confirming which smart values are available, based upon an example story:
https://support.atlassian.com/jira-software-cloud/docs/find-the-smart-value-for-a-field/
Okay, let's try to diagnose this from both directions:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you again, Bill.
We use Company/Classic and currently using the Story Points field.
We only have one-and-only-one Story Points field within the scope.
I configured my automation rule to use {{issue.Dev estimate.trim().asNumber}} but it didn't change the results so, I added more logging to capture the values before AND after executing the edit. It helped reveal what appears to be a bug. In brief, here is what I tried:
-directly edit the story points field to contain a valid value
-modify the value in the Dev estimate field
-modify the value in the Dev estimate field, again
-check the logs
It's interesting what happens...
For the first Dev estimate field modification, the story point value does not change.
For the second Dev estimate field modification, the story point value is nulled out.
I've attached the results of the log.
Thanks in advance for any insight you can give.
Tim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Curious.. Have you checked if any workflow, other rules, or scripting post-functions impact either of those fields?
Have you checked if Story Points was changed from numeric to a defined-value list? That could explain why 8 (a valid Fibonacci number) would work and why 16 would not.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill,
Yeah, nothing else is getting in the way of the fields. Story Points is still a numeric.
I had another thread going with Atlassian Support. They suggested this simple change to the smart value,
issue.customfield_10127.value
And, it worked!
I'll follow up on the odd deletion behavior but at least I can move forward with my project.
Thank you again, Bill, for all of your help. It was truly insightful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am glad you got it to work! Good job, Atlassian Support team!
Makes me wonder if that custom field was ever created with another type, or is shadowing a previously and similarly named field. Hmmm...
One could observe that some aspects of automation for Jira are a tad under-documented at this point. (e.g. when can custom fields use the name versus the number versus the <> syntax, and with which functions). No doubt that will improve over time and with customer experimentation. ;^)
Have a good one!
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.