How to email Tempo Timesheet on approval

Hi,

I need to email a users time-sheet to predefined person once it is approved. The format of the time-sheet data could be csv/excel/pdf/screenshot maybe, not worried about that at this stage. The email recipient would be a "Tempo Team Lead", maybe a completely external user/email address, or (and preferably) a "Tempo Account Contact". 

I can't find an easy way to do this from any builtin feature or existing plugins. I found some information which I know would help me do develop an external tool, probably excel based, to query Tempo via Rest API, maybe on a scheduled basis etc. (Link 1 and link 2). I can do this, but consider it clunky, I need another pc/server, an Excel licence, Scheduled tasks etc. It seems like a lot of overhead...

I want to do it directly from within JIRA, so I am thinking of using Script-runner to do it. I got stuck on the first hurdle of not being able to find an event I could listen for when a time-sheet is approved...

  • Is there a "Tempo Time-sheet Approved" event I can listen for, how to do this?
  • Have I completely missed a simple way to do what I need?
  • Any pointers or example groovy script I can use in Script-runner?

I am a novice script/coder, but happy to experiment if I knew where to start....

 

3 answers

Hi - Possibly you have already come across these two links, they are not exactly what you are looking for but these links may give you some hints:

  1. https://answers.atlassian.com/questions/22653555 [please look at the last answer]
  2. https://scriptrunner.adaptavist.com/latest/jira/working-with-tempo.html

 

Hi - yes, I found those also before I posted. The one you linked at Bullet 1 above does indeed mention "Tempo Time sheets does actually fire an event when a time sheet is submitted, rejected and approved. So I believe this should be possible. However, we haven't published this as part of a public API"

No further clues were given as to how to listen for these events, what they are called, and I could not find them in any drown downs or menus on my instance... I cant find any more info online either, which prompted me to ask here...

Maybe someone from the Tempo team could give me some clues?

0 vote

I was able to get something working but it was horribly hacky. I have created https://productsupport.adaptavist.com/browse/SRJIRA-1910 which is about listening to events provided by plugins.

Thanks, I'll follow that issue and see how it develops...

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Published Apr 19, 2018 in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

366 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you