Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • How do I set up an active directory configuration pointing at a folder with spaces in the name?

Automation and formatting to 2 decimal places

Julia Foden
Contributor
April 27, 2021

Hi

I want to calculate the amount of time between certain workflow statuses and for the result to be in hours with 2 decimal places.

For testing I am taking the minutes since creation, dividing by 60 and putting this in a variable called hours:

{{#=}}{{now.diff(issue.created).minutes.abs}} / 60{{/}}

The variable is fine and prints to the log as {{hours}}

But I can't get the formatting to work. I tried {{hours.format("###.##")}}  following the answer in this question but that produces no output at all. Any tips welcome, thanks!

 

2 answers

1 accepted

0 votes
Answer accepted
Justin Corcoran
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 Champions.
March 30, 2012

Turns out I needed to be using "ou" instead of "cn"

Here's the reply I got from Atlassian support:

The CN value is only for a group, user or contact of the LDAP directory. So, the LDAP structure should be <tt>dc=Users,dc=example,dc=com</tt> or<tt>ou=Managed Users,dc=example,dc=com</tt>

However, facing what you are trying to achieve, I believe that the best option to set an external directory would be to:

  1. Set the Base DN value only with the root domain
  2. Check the 'How to write LDAP search filters documentation to better plan the users and group import process.
0 votes
lrobertson39
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 Champions.
March 30, 2012

Have you tried escaping the space using a '\' ?

Suggest an answer

Log in or Sign up to answer