changing original estimate of issue automatically with another custom field

Umar Maroof March 22, 2023

Hi 

Actually I am try to change the original estimate of issue depend upon the value enter in another custom field number from 1 to 100.

so for example let suppose we have original estimate 10h when we enter 60 in another custom field I will change 10H to 60 percentage like 6H ,I am using Jira automation here is the following step I did

  • Trigger issue updated
  • advance compare condition {{issue.fields.customfield_<custom_field_10185>}} equal to empty
  • Action edit field original estimate ({{issue.fields.customfield_10185}} / 100) * {{issue.originalEstimate}}

But it gives error

(Specify a valid value for Original estimate (timetracking_originalestimate), Specify a valid value for Original estimate (timetracking))

kindly help me with this.

 

1 answer

1 accepted

0 votes
Answer accepted
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 22, 2023

Hi @Umar Maroof 

The correct smart value would be:

{{issue.fields.timetracking.originalEstimateSeconds.multiply(issue.fields.customfield_10185).divide(100)}}

But to be fairly honest, I'm quite puzzled of how and IF your rule is going to work properly.

  • You have an original estimate of e.g. 1h and your number field is empty.
  • You place a value on that number field equal to 50
  • Then your Original Estimate will go to 30m
  • If you try to increase the Number value back to 100, then it will not go back to 1h

Just making sure that you have thought of every aspect of your rule.

Umar Maroof March 22, 2023

@Alex Koxaras _Relational_ is there is any idea how I increase that ? But increasing Coustom field value?

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 22, 2023

@Umar Maroof the first thing you want to do is to write down all your requirements about how this rule would work. And cover all aspects of it. When you have this, then I might be able to provide a better answer and a possible solution.

Umar Maroof March 22, 2023

@Alex Koxaras _Relational_ what I am trying to do let suppose we have an issue which is estimated 10H and we have time period for a issue lets suppose 7 days so this issue is no complete in 7 days the work of this issue is done only 60% so the user only enter 60 on that custom field so the original estimate of that issue will change to 6H and when he enter 60 the new issue is created automatically and its original estimate will be the difference of the original estimate before we enter value like 10H and the original estimate after we enter value i.e. 6H so the automatically created issue then having the original estimate 4H that what I am trying to do 

Can you please help me for filling the original estimate for automatic issue that we will be difference of he original estimate before we enter the value of custom field for the pervious issue and the original estimate of pervious issue after enter value ...I.e. in example will be 4H

Umar Maroof March 22, 2023

@Alex Koxaras _Relational_ Also the smart value you give me above its not working exactly like some time rules run for many times some time 2 time and the values are very different in original estimate 

I enter 8m first original estimate then I enter 50 in custom field it changes to 4h

then I enter 10h and enter 50 in custom field it changes to 7w 2d 4h

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 22, 2023

@Umar Maroof the smart value I gave you works exactly as you specified on your question. No more, no less. Saying it's not working correct, while not giving any details of how you use it in your rule and what are the expected vs the actual results, doesn't help me in providing additional help :/

Umar Maroof March 22, 2023

@Alex Koxaras _Relational_ I write the details above also I edit my comment can you please help me with this

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 22, 2023

The steps you are referring to are the following:

  1. we have an issue which is estimated 10H and
  2. we have time period for a issue lets suppose 7 days so
  3. If(?) this issue is not complete in 7 days the work of this issue is done only 60%
  4. so the user only enter 60 on that custom field
  5. so the original estimate of that issue will change to 6H and
  6. when he enter 60 the new issue is created automatically and
  7. its original estimate will be the difference of the original estimate before we enter value like 10H and the original estimate after we enter value i.e. 6H so the automatically created issue then having the original estimate 4H

So basically what you are trying to achieve is to create a new issue when the user will enter a number on a numeric field in jira and on that new issue the original estimate will be the difference between the "old's" issue original estimate, minus the  "old's" issue original estimate times the numeric field (divided by 100).

Yes, you could do that, but why you want to mess with the original estimate? The original estimate as a field is there to simply give you information about the actual estimation of the time you thought this work will need. And you need this value in order to do later a retrospective. Changing this value will manipulate your data and you will lose the ability to measure effectively your team's capacity and capability of estimating issues.

Like Umar Maroof likes this
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 22, 2023

@Umar Maroof concerning your last comment

@Alex Koxaras _Relational_ I write the details above also I edit my comment can you please help me with this

The smart value I provided works just fine. I've tested it on my instance with both your examples and it yields correct results:

ezgif-3-4fd0a88913.gif

Umar Maroof March 23, 2023

@Alex Koxaras _Relational_ yes you are right I am exactly trying to do that the steps you explain in above comment.

this is because we have reports for every weeks so some tasks are unfinished so this method is for that tasks so new issue will create and that difference of original estimate will consider in that issue

can you help me with that how can I achieve that 

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 23, 2023

@Umar Maroof I could guide you in the right direction, but you still haven't answered me or replied to the previous comments I made about:

  • Why you want to mess with original estimate when this value is a metric of your ability to estimate issues (and use it on your retrospective)
  • What are the business requirements of the rule: What will happen if someone increase the value of the number, instead of decreasing it? What will happen if someone erase completely the value of the number field? Have you thought of all possible user cases? This is super important.
  • You didn't reply if you manage to get the result of the smart right

So to answer your question and help you/guide you:

  • Think of the above and answer them for yourself
  • Use the smart value I gave you. It is correct
  • If you want to have the ability to reset the value back to normal, then you should think that you have to:
    • either keep the original estimate value intact and create another field OR
    • copy the original estimation value to another field and refer to it on your calculations when the user will increase the value

Valuable links are:

You should study the above and learn how to create rules and to debug them in order to find what's wrong. They will help you achieve your goal!

Umar Maroof March 25, 2023

Thankyou so much for your valuable time and help.

Suggest an answer

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

Atlassian Community Events