Hi everyone,
My problem is the following:
I want to extract the value of <Field 2> from the value of <Field 1> and put the difference in the <Field 3>․ And I need the Field 1 to be fixed amount for the year, and each time I open the issue I need this field to be the result of the Field 3 of previous issue. I will need to update the number every year.
For example
Field 1 - 10000
Field 2 - 4000
Field 3 - 6000
How can I have this. That will help a lot.
Hi @Lusine
This can be done with an automation rule depending all the fields are of the type number.
On the edit action set Field 3 as: {{#=}}{{issue.field1}} - {{{issue.field2}}{{/}}
I don't know what you exactly mean with the 2nd part of your post, can you elaborate?
Thanks a lot for the first part!
The purpose is to fix a yearly budget for the issue and to extract the amount of field2 every time the issue is created and when the number is 0 to show an error when I try to create a new issue.
Is it possible to do this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Lusine
That part is tricky and might no be possible.
As I understand you want to create a new issue and then Field 1 needs to have the value of Field 3, but the system doesn't know what the previous issue was.
You could tackle this with another automation with a manual trigger and clone the previous issue and copy the value of field3 of the trigger issue to field1 on the new issue.
You can have a condition in this automation to check if the value on the trigger issue in field3 is not 0 and then stop the automation.
This does mean you should not create issues in this project via the create button.
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.
Hi @Lusine , you can use Automation for this. Are you comfortable with writing Automation rules? There are a number of post discussing calculating the difference between two fields (dates is the most talked about).
Basically you can use the "minus" automation function here. For example...
{{issue.field 1.minus(issue.field 2.abs)}}
you would add an Edit action and choose Field 3 to edit and set the value to the above smartvalue expression. Note the "abs" would return the Absolute value but if you wish to retain the sign then leave that off. I am working from memory (have not tested) so let me know if it does not work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jack Brickey ,
Thanks a lot for your help.
Maybe you know a way to do this too:
The purpose is to fix a yearly budget for the issue and to extract the amount of field2 every time the issue is created and when the number is 0 to show an error when I try to create a new issue.
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.