Track expense reports with multiple currencies in Jira with Elements Checklist

Jira's capabilities reach beyond your typical bug tracking and feature development tasks - allowing you to do more of your core business activities without having to leave the platform. 

In this use case, we'll show you how to track expense reports with Jira and Elements Checklist.

See it in action

In this fictional example, when an employee wants to file a report for his monthly expenses, he creates an issue in the dedicated project. He will be asked to enter the exchange rates (which can also be done automatically with Elements Connect, as detailed below):



The second step is to list the expenses. With an "out of the box" version of Jira, one would have to use sub-tasks. It is a workable solution, but it comes with limitations:

  • The sum of all expenses cannot be calculated in the parent issue
  • Expenses in different currencies cannot be converted to the local currency
  • Adding expenses requires many actions from the user
  • And finally, the fields (or properties) of expenses can only be edited by Jira Administrators - project administrators do not have access to these rights

For all these reasons, we will use our app Elements Checklist.



With Elements Checklist, individual expenses are created from the main issue and the final calculation is also displayed within the issue. Amounts are automatically converted to the local currency (euros in this case), thanks to the power of Elements Checklist's advanced calculation attributes.

Amounts are live computed and visible in the table footer.

Once the expenses are all listed, we can send the report for approval with the "Send to approval" transition. The issue is automatically assigned to the manager in charge of the validation. 



In this example, the editing restriction has been configured to "only the assignee can edit the panel." This means that we can't edit the expenses listed in the Elements Checklist panel anymore as we are no longer the assignee. 

Configuration

The configuration of the panel is defined at the project level: any user with administration project permissions on the current project can create and edit the configuration of Elements Checklist panels:



The configuration of an Elements Checklist panel is split into four tabs:

  • General configuration
  • Structure
  • Template
  • Permissions

We'll see in detail the content of each for this use case.

General configuration



This is where we set the panel name and associate it with issue types.
Learn more about the General settings.

Structure



Here, we define the structure of the panel by determining the composition of attributes.

For our expenses use case, we have defined six attributes:

  • Approved: A checkbox that managers will use to approve individual expenses.
  • Type: A mandatory select list where users can select the type of expense.
  • Receipt: An optional file picker who purpose is to display the receipt used to justify the expense.
  • Amount: A mandatory number attribute where we'll enter the expense's amount.
  • Currency: A mandatory select list to select the expense's currency. The default is set to EUR.
  • Amount (€): A calculation attribute where the amount will be automatically converted in euros.

The configuration of the first five attributes is easy, which you can learn more about here.

Let's have a deeper look at the configuration of Amount (€)



Amount (€) is a calculation attribute in advanced mode.

It is computed from the value of:

  • Amount and Currency attributes
  • GBP to EUR and USD to EUR number custom fields.

According to currency selected, the original amount is converted (or not) using the conversion rate set in the relevant custom fields. This is made possible by the powerful calculation language of Elements Checklist.

if(element.Currency == 'GBP') {
  return element.Amount * issue["GBP to EUR(12213)"];
} else if(element.Currency == 'USD') {
  return element.Amount * issue["USD to EUR(12214)"];
} else {
  return element.Amount;
}


Other Elements attributes can be referenced with the element variable (followed by the attribute name) and the issue fields through the issue variable. You can reference any issue field of type number.

Learn more about the advanced calculation attributes.

Template

In the Template tab, we can set pre-defined panel content so users can import it automatically in the issue panel. 
This feature is not applicable to the current use case - so we'll leave it empty.

Permissions

The workflow of our Expense report issues is basic:



The expenses can be edited only during the Submitting expenses and Manager validation steps, indeed once they have been approved by the manager they can not be modified. Another restriction that we'd like to set is who can edit the panels.
In our configuration, the assignee is not configurable but is automatically set during transitions: first to the reporter of the issue (during the Submitting expenses step) and then to the manager. The ideal scenario would be to authorize only the current assignee to edit the panel.

This is possible with Elements Checklist's editing permissions feature:



Here, this panel is configured to be edited only during the Manager validation and Submitting expenses steps, and only by the user in the Assignee custom field.

Automatically get exchange rates with Elements Connect

Server only


Elements Connect is only available for the Jira Server.

Interested by a Cloud version of Elements Connect? Have a look at this issue and do not hesitate to watch it and to leave a comment.

In this example, the user is asked to manually enter the conversion rate that will be used by Elements Checklist to convert amounts. This manual step is error prone and cumbersome.

With Elements' Jira app Elements Connect, we can automatically retrieve the day's exchange rate during a workflow transition in a Elements Connect field, copy it to a number field and use it in our Elements Checklist formula.



Discover how Elements Connect can help in this step by step tutorial.