Hello, I'm trying to automate the process of filling estimated hours in my project. What I am trying to do is to get the input from a field (text), for which at the moment I'm testing out using just the description field.
The idea is to be able to manipulate the string of the field to automatically add it to the Original Estimate field. I am trying at the moment (without success) using Project Automation, New Action > Edit Issue.
I have 2 scenarios for which I need help:
1. Let's say I have in description the following value: 100 hours
I want to use jira automation to get this value copied from the description field over to the Original Estimate one. When trying it directly, the word "hours" isn't recognised in the field, so it needs to be replaced to "h".
2. Another example is when I have something different than hours in the description and I need to do some calculations with it.
Let's say I'm translating and the scope is 10000 words, which take 500 words an hour, so when having in description "10000 words".
I need to be able to remove the word "words", divide the number by 500 and add "h" at the end and copy it to the Original Estimate field.
Hence I would like to know if there's a way to manipulate text strings using Json so I can just say. Where "hours" replace it with "h".
Thanks in advance!
This JSON works fro the 100hours (without space) situation.
Changing de regex could make it work for any other cases.
The regex is prepared for finding the text after some other text, change it by deleting (?:.*)\s and It will find the 'xxxhours' at beginning of the line, if you add \s* it will find 'xxx hours' with or without space between the number and the word hours.
playing with the regex you can make this work fine.
I recomend you https://regexr.com to try and to learn about regex
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events