Is a rolling budget field possible?

Scott Federman November 14, 2017

my company wants to manage their orders in jira. They want to have the parent issue contain a total budget and all the child tickets contain their costs which subtract from the total budget in the epic. Is this even remotely possible?

4 answers

7 votes
Johnson Wang November 16, 2017

Hi @Scott Federman,

You can do this using the Power Scripts add-on.

There is a video tutorial walking you through in detail here, and we've also posted a short, sample script you can copy and paste or forward to your engineer.

Hope this helps!

Johnson

Scott Federman November 16, 2017

@Johnson Wang

 

That was very helpful! Can this be used on other issue types like story as opposed to sub-tasks?

 

Scott

Johnson Wang November 21, 2017

@Scott Federmanglad to hear it was hopeful :)

Yes, you can definitely modify this script so that it can be used between other issue types aside from just sub-tasks.

Hand the short script over to any engineer and they'll be able to quickly make the changes to the customfield IDs and logic for you.

0 votes
Scott Federman November 28, 2017

Hey All, 

 

Still having some issues getting the rolling budget to work. Would anyone be able to possibly show my what script will work for this? Here is the set up. 

 

Issue Types: 

  • Project Budget
  • Order Request

Custom Fields

  • Budget (Project Budget)
  • Remaining Budget (Project Budget)
  • Expense (Order Request)

Link Type: Relates To

Function: Budget-Expense = Remaining Budget

Scenario: A project budget is entered into the budget field in the project budget issue type. Expenses are entered into the Expense field in the Order request issue type and then linked to the project budget using the relates to link type. The Remaining budget field is calculated and returned based on the expense being subtracted from the budget.

Johnson Wang November 28, 2017

@Scott Federmandid you try this using the Power Scripts add-on, and following the video we recorded?

It should have addressed this exact use case for you, but let me know where you're still having challenges.

Scott Federman November 29, 2017

Hi Johnson, 

 

It addressed the issue whereas the child is a subtask.  I am not using subtask however. It is a custom issue type of order request which is linked by "is related to". This will allow the user to create orders from the create screen instead of going into the "parent" issue and creating a subtask type which will eliminate a step for the user. 

 

I unfortunately dont have anyone who can help me script this function so any direction you could provide would be massively helpful.

Jonathan Muse _Appfire_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 9, 2018

@Scott Federman if you would like assistance writing this script I would be happy to help. Just let me know.

0 votes
Scott Federman November 14, 2017

Thank you Alexey

Thats great news! I unfortunately am not a programmer and totally illiterate when it comes to writing scripts. Could you give me an example to work from? It would be simple subtraction.

0 votes
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 14, 2017

Yes, it is possible if you have a plugin like Adaptivist Scriptrunner or similair. In Scriptrunner you could create a scripted field which would make the calculations.

Suggest an answer

Log in or Sign up to answer