You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "Cappoli, William" <wc...@firstam.com> on 2008/11/10 20:18:56 UTC

Trying to write data on separate lines of email sent by jelly script

I'm working on a Jelly script that will be used within an instance of
the JIRA tracking system. The script executes a filter to determine what
items are past due. All of the items that are found are than commented
that it is being escalated. The script that triggers an email to be sent
that contains a brief message and a list of the past due items.
Everything works except all of the items are written on the same line.
However, I would prefer that each item be on its own line for
readibility purposes. I have tried everything I can think of and nothing
works. Below is the code I have and was hoping someone might be able to
help out infiguring this one out:

<JiraJelly
xmlns:jira="jelly:com.atlassian.jira.jelly.enterprise.JiraTagLib"
xmlns:core="jelly:core" xmlns:email="jelly:email" xmlns:log="jelly:log">

<jira:Login username="admin" password="rocit">

<log:warn>Running Inactivate issues service</log:warn>
    <!-- Properties for the script -->
    <core:set var="comment">Issue not resolved by due date has been
escalated.
        
Thank you,
    
  Admin</core:set>

    <!-- Run the SearchRequestFilter -->
    <jira:RunSearchRequest filterid="10040" var="issues" />

    <core:forEach var="issue" items="${issues}">

	<!-- <jira:AddComment issue-key="${issue.key}"
comment="${comment}"/> -->
 
    </core:forEach>

<core:set var="emailMsg">The following issues flagged as critical
severity are now past due:

<core:forEach var="issue" items="${issues}">
Issue: ${issue.key}

</core:forEach>

Thank you,
Admin
</core:set>


<email:email to="AutomationTeam@test.com" from="AutomationTeam@test.com"
subject="Past Due Critical Items" server="smtp.firstam.com"
message="${emailMsg}" />

</jira:Login>
</JiraJelly>

Thanks

Bill Cappoli 



------------------------------------------------------------------------------
***** The contents of this email may be confidential *****

This e-mail message and any attached files are intended solely for the use of the individual(s) addressed and may 
contain confidential, proprietary or privileged information.

If you received this message in error or are not the intended recipient, please destroy this e-mail message and 
any attachments or copies. You may not retain, distribute or use any information in this e-mail or any of its 
attachments. Please inform us of the erroneous delivery by return e-mail. Thank you for your cooperation.

==============================================================================

RE: Trying to write data on separate lines of email sent by jelly script

Posted by "Cappoli, William" <wc...@firstam.com>.
Thanks Paul I will give it a try.  


Bill Cappoli 
Intermediate Business Systems Analyst
Roc IT 
Phone - 1-800-969-8787 ext. 6795 
Fax - 1-800-644-6262 


-----Original Message-----
From: Paul Libbrecht [mailto:paul@activemath.org] 
Sent: Monday, November 10, 2008 4:10 PM
To: Commons Users List
Subject: Re: Trying to write data on separate lines of email sent by jelly script

Bill,

have you tried trim="no" at each child of email?
That is generally the way to go in jelly but plain-text-formatting is always difficult in jelly.
My experience was you end up having a slightly unreadable code (but a readable output!).

paul


Le 10-nov.-08 à 20:18, Cappoli, William a écrit :

> I'm working on a Jelly script that will be used within an instance of 
> the JIRA tracking system. The script executes a filter to determine 
> what items are past due. All of the items that are found are than 
> commented that it is being escalated. The script that triggers an 
> email to be sent that contains a brief message and a list of the past 
> due items.
> Everything works except all of the items are written on the same line.
> However, I would prefer that each item be on its own line for 
> readibility purposes. I have tried everything I can think of and 
> nothing works. Below is the code I have and was hoping someone might 
> be able to help out infiguring this one out:
>
> <JiraJelly
> xmlns:jira="jelly:com.atlassian.jira.jelly.enterprise.JiraTagLib"
> xmlns:core="jelly:core" xmlns:email="jelly:email"  
> xmlns:log="jelly:log">
>
> <jira:Login username="admin" password="rocit">
>
> <log:warn>Running Inactivate issues service</log:warn>
>    <!-- Properties for the script -->
>    <core:set var="comment">Issue not resolved by due date has been 
> escalated.
>
> Thank you,
>
>  Admin</core:set>
>
>    <!-- Run the SearchRequestFilter -->
>    <jira:RunSearchRequest filterid="10040" var="issues" />
>
>    <core:forEach var="issue" items="${issues}">
>
> 	<!-- <jira:AddComment issue-key="${issue.key}"
> comment="${comment}"/> -->
>
>    </core:forEach>
>
> <core:set var="emailMsg">The following issues flagged as critical 
> severity are now past due:
>
> <core:forEach var="issue" items="${issues}">
> Issue: ${issue.key}
>
> </core:forEach>
>
> Thank you,
> Admin
> </core:set>
>
>
> <email:email to="AutomationTeam@test.com" 
> from="AutomationTeam@test.com "
> subject="Past Due Critical Items" server="smtp.firstam.com"
> message="${emailMsg}" />
>
> </jira:Login>
> </JiraJelly>
>
> Thanks
>
> Bill Cappoli
>
>
>
> ----------------------------------------------------------------------
> --------
> ***** The contents of this email may be confidential *****
>
> This e-mail message and any attached files are intended solely for the 
> use of the individual(s) addressed and may contain confidential, 
> proprietary or privileged information.
>
> If you received this message in error or are not the intended 
> recipient, please destroy this e-mail message and any attachments or 
> copies. You may not retain, distribute or use any information in this 
> e-mail or any of its attachments. Please inform us of the erroneous 
> delivery by return e- mail. Thank you for your cooperation.
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: Trying to write data on separate lines of email sent by jelly script

Posted by Paul Libbrecht <pa...@activemath.org>.
Bill,

have you tried trim="no" at each child of email?
That is generally the way to go in jelly but plain-text-formatting is  
always difficult in jelly.
My experience was you end up having a slightly unreadable code (but a  
readable output!).

paul


Le 10-nov.-08 à 20:18, Cappoli, William a écrit :

> I'm working on a Jelly script that will be used within an instance of
> the JIRA tracking system. The script executes a filter to determine  
> what
> items are past due. All of the items that are found are than commented
> that it is being escalated. The script that triggers an email to be  
> sent
> that contains a brief message and a list of the past due items.
> Everything works except all of the items are written on the same line.
> However, I would prefer that each item be on its own line for
> readibility purposes. I have tried everything I can think of and  
> nothing
> works. Below is the code I have and was hoping someone might be able  
> to
> help out infiguring this one out:
>
> <JiraJelly
> xmlns:jira="jelly:com.atlassian.jira.jelly.enterprise.JiraTagLib"
> xmlns:core="jelly:core" xmlns:email="jelly:email"  
> xmlns:log="jelly:log">
>
> <jira:Login username="admin" password="rocit">
>
> <log:warn>Running Inactivate issues service</log:warn>
>    <!-- Properties for the script -->
>    <core:set var="comment">Issue not resolved by due date has been
> escalated.
>
> Thank you,
>
>  Admin</core:set>
>
>    <!-- Run the SearchRequestFilter -->
>    <jira:RunSearchRequest filterid="10040" var="issues" />
>
>    <core:forEach var="issue" items="${issues}">
>
> 	<!-- <jira:AddComment issue-key="${issue.key}"
> comment="${comment}"/> -->
>
>    </core:forEach>
>
> <core:set var="emailMsg">The following issues flagged as critical
> severity are now past due:
>
> <core:forEach var="issue" items="${issues}">
> Issue: ${issue.key}
>
> </core:forEach>
>
> Thank you,
> Admin
> </core:set>
>
>
> <email:email to="AutomationTeam@test.com" from="AutomationTeam@test.com 
> "
> subject="Past Due Critical Items" server="smtp.firstam.com"
> message="${emailMsg}" />
>
> </jira:Login>
> </JiraJelly>
>
> Thanks
>
> Bill Cappoli
>
>
>
> ------------------------------------------------------------------------------
> ***** The contents of this email may be confidential *****
>
> This e-mail message and any attached files are intended solely for  
> the use of the individual(s) addressed and may
> contain confidential, proprietary or privileged information.
>
> If you received this message in error or are not the intended  
> recipient, please destroy this e-mail message and
> any attachments or copies. You may not retain, distribute or use any  
> information in this e-mail or any of its
> attachments. Please inform us of the erroneous delivery by return e- 
> mail. Thank you for your cooperation.
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================