My Email Body is as follows
My Resultant Email is as follows
Expected View should be
My Jira Automation is as follows
Hi @Altamash Heroli -- Welcome to the Atlassian Community!
Adding to the suggestions from @Valerie Knapp there are no built-in sort or group-by list functions to help with what you asked. A marketplace app would be needed for advanced reporting like this. However...
A workaround is possible if you know all possible work log author's and are okay with hardcoding them in the expression. The approach would be:
For example:
{{#lookupIssues}}
* {{key}} --
{{#if(worklog.author.displayName.flatten.distinct.match("(Altamash)").size.gt(0))}}
Altamash: {{#=}}(0{{#worklog}}{{#if(author.displayName.equals("Altamash"))}}+{{timeSpentSeconds}}{{/}}{{/}}){{/}} seconds; {{/}}
{{#if(worklog.author.displayName.flatten.distinct.match("(Bill)").size.gt(0))}}
Bill: {{#=}}(0{{#worklog}}{{#if(author.displayName.equals("Bill"))}}+{{timeSpentSeconds}}{{/}}{{/}}){{/}} seconds; {{/}}
{{/}}
Here is the key part of that expression, and it would be repeated for each possible worklog author. I formatted it a bit to make it easier to explain.
{{#if(worklog.author.displayName.flatten.distinct.match("(Altamash)").size.gt(0))}}
Altamash:
{{#=}}( 0
{{#worklog}}
{{#if(author.displayName.equals("Altamash"))}}
+{{timeSpentSeconds}}
{{/}}
{{/}}
)
{{/}} seconds;
{{/}}
How that works is:
If you want to use this, repeat the section for each author, and experiment to add your table / row formatting. "Pretty printing" the total time is much more difficult (although theoretically possible). Instead I recommend picking a unit value and dividing; for example, divide and round to display in minutes or hours.
Kind regards,
Bill
hie @Bill Sheboy
Thanks for the help.
Your Solution worked absolutely well.
Now my email gives me this result.
Could you help me get this into a tabular format?
Thanks
Altamash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
One simple version would use basic HTML for a table, as you did in your original question. Adding that approach to the example I provider earlier, it could be this:
<table border="2" style="border-collapse: collapse;"
<tr>
<th>Work Item</th>
<th>Worklog Author</th>
<th>Time Logged</th>
</tr>
{{#lookupIssues}}
{{#if(worklog.author.displayName.flatten.distinct.match("(Altamash)").size.gt(0))}}
<tr>
<td>{{key}}</td>
<td>Altamash</td>
<td align="right">
{{#=}}ROUND((0{{#worklog}}{{#if(author.displayName.equals("Altamash"))}}+{{timeSpentSeconds}}{{/}}{{/}}) / 3600, 2){{/}}h
</td>
</tr>
{{/}}
{{#if(worklog.author.displayName.flatten.distinct.match("(Bill)").size.gt(0))}}
<tr>
<td>{{key}}</td>
<td>Bill</td>
<td align="right">
{{#=}}ROUND((0{{#worklog}}{{#if(author.displayName.equals("Bill"))}}+{{timeSpentSeconds}}{{/}}{{/}}) / 3600, 2){{/}}h
</td>
</tr>
{{/}}
{{/}}
</table>
In this example, I divided the time value sums by 3600 seconds to display in fractional hours and display the work item key on every row.
Depending upon how the HTML is used, using rowspan to merge rows and only include the key once may not work...and is challenging to implement due to the unknown ordering of the worklog entries preventing adding the key one time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot... I was able to get the desired result
Your Responses were very precise and up to the point
Thanks
Altamash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Altamash Heroli , welcome to the Atlassian Community and thanks for your post!
Thank you for explaining thoroughly your use case. I understand what and why you are trying to achieve this.
I will just say, however, it's likely you will need an app to achieve this fully. Whatever you will be able to do with this automation will be a workaround, as opposed to having the support of an app such as Email this issue, which is purpose-built for this kind of thing. I am not paid to say this, by the way. I have just found that with the support of a vendor and their service desk, I have gotten to achieve much better results. If you have any budget for this, I would consider this app because, as I said, the support is also very good. https://marketplace.atlassian.com/apps/4977/email-this-issue?hosting=cloud&tab=overview
Best wishes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the quick response.
But unfortunately, we dont have budget for this.
Is there is no way to loop the issue (within the email body) to group it by Group the worklog Author and sum up his total hours as per the Issue?
Thanks
Altamash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Time to up your Loom game! The new Loom Essentials Certification is here! Show off your skills, learn pro tips, and get officially recognized. Perfect for taking your video messaging to the next level.
Learn moreOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.