How to change "Job #" to "Job <name>"?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

How to change "Job #" to "Job <name>"?

Peter Steele

We have a custom build template that we use in our email notification that display the job steps as

 

Job # nnnn on <host>:

 

I’d like to change this to

 

Job “<job-name>” on <host>:

 

I’m not sure how to change the Velocity template to accomplish this. The current code is:

 

#foreach($trace in $workflow.JobTraceArray)

<h3><a href="$serverSettings.ExternalUrl/tasks/jobs/JobTasks/viewBuildSummary?job_trace_id=$trace.Id">Job # $trace.Id

#if($trace.Agent)

on $trace.Agent.Name:

#else

:

#end

 

The key text here of course is the reference to $trace.Id. What do I replace this with to get the job name?

 


_______________________________________________
Anthill-pro mailing list
[hidden email]
http://lists.urbancode.com/mailman/listinfo/anthill-pro
Reply | Threaded
Open this post in threaded view
|

RE: How to change "Job #" to "Job <name>"?

Peter Steele

I haven’t had any feedback on this. I assume this must be a simple change. I tried replacing $trace.Id with $trace.Name but that didn’t work (I didn’t really expect it to). I need the job name associated with a given trace entry.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Peter Steele
Sent: Monday, January 12, 2009 10:22 AM
To: AnthillPro user and support list.
Subject: [Anthill-pro] How to change "Job #" to "Job <name>"?

 

We have a custom build template that we use in our email notification that display the job steps as

 

Job # nnnn on <host>:

 

I’d like to change this to

 

Job “<job-name>” on <host>:

 

I’m not sure how to change the Velocity template to accomplish this. The current code is:

 

#foreach($trace in $workflow.JobTraceArray)

<h3><a href="$serverSettings.ExternalUrl/tasks/jobs/JobTasks/viewBuildSummary?job_trace_id=$trace.Id">Job # $trace.Id

#if($trace.Agent)

on $trace.Agent.Name:

#else

:

#end

 

The key text here of course is the reference to $trace.Id. What do I replace this with to get the job name?

 


_______________________________________________
Anthill-pro mailing list
[hidden email]
http://lists.urbancode.com/mailman/listinfo/anthill-pro
Reply | Threaded
Open this post in threaded view
|

Re: How to change "Job #" to "Job <name>"?

Ryan Smith-3-3
Peter,

Instead of $trace.id, try $trace.name

Ryan Smith

Peter Steele wrote:

>
> I haven’t had any feedback on this. I assume this must be a simple
> change. I tried replacing $trace.Id with $trace.Name but that didn’t
> work (I didn’t really expect it to). I need the job name associated
> with a given trace entry.
>
> *From:* [hidden email]
> [mailto:[hidden email]] *On Behalf Of *Peter
> Steele
> *Sent:* Monday, January 12, 2009 10:22 AM
> *To:* AnthillPro user and support list.
> *Subject:* [Anthill-pro] How to change "Job #" to "Job <name>"?
>
> We have a custom build template that we use in our email notification
> that display the job steps as
>
> Job # nnnn on <host>:
>
> I’d like to change this to
>
> Job “<job-name>” on <host>:
>
> I’m not sure how to change the Velocity template to accomplish this.
> The current code is:
>
> #foreach($trace in $workflow.JobTraceArray)
>
> <h3><a
> href="$serverSettings.ExternalUrl/tasks/jobs/JobTasks/viewBuildSummary?job_trace_id=$trace.Id">Job
> # $trace.Id
>
> #if($trace.Agent)
>
> on $trace.Agent.Name:
>
> #else
>
> :
>
> #end
>
> The key text here of course is the reference to $trace.Id. What do I
> replace this with to get the job name?
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Anthill-pro mailing list
> [hidden email]
> http://lists.urbancode.com/mailman/listinfo/anthill-pro
>  
_______________________________________________
Anthill-pro mailing list
[hidden email]
http://lists.urbancode.com/mailman/listinfo/anthill-pro
Reply | Threaded
Open this post in threaded view
|

RE: How to change "Job #" to "Job <name>"?

Peter Steele
> Instead of $trace.id, try $trace.name

No, this doesn't work. The email ends up with lines like this:

Job # BuildLifeJobTrace on <host>:

This is the name of the underlying object it seems, not the name of the
job that the trace object encapsulates. Any other options?

_______________________________________________
Anthill-pro mailing list
[hidden email]
http://lists.urbancode.com/mailman/listinfo/anthill-pro
Reply | Threaded
Open this post in threaded view
|

Re: How to change "Job #" to "Job <name>"?

Ryan Smith-3-3
I'd have to check what version we changed it, but we did change it so
that it would return the job configuration name. I believe its in the
latest on our site. What version are you using?


Ryan

Peter Steele wrote:

>> Instead of $trace.id, try $trace.name
>>    
>
> No, this doesn't work. The email ends up with lines like this:
>
> Job # BuildLifeJobTrace on <host>:
>
> This is the name of the underlying object it seems, not the name of the
> job that the trace object encapsulates. Any other options?
>
>
>  
_______________________________________________
Anthill-pro mailing list
[hidden email]
http://lists.urbancode.com/mailman/listinfo/anthill-pro
Reply | Threaded
Open this post in threaded view
|

RE: How to change "Job #" to "Job <name>"?

Peter Steele
We're still on 3.5.2_13271.

-----Original Message-----
From: Ryan Smith [mailto:[hidden email]]
Sent: Wednesday, January 14, 2009 7:42 AM
To: Peter Steele
Cc: AnthillPro user and support list.
Subject: Re: [Anthill-pro] How to change "Job #" to "Job <name>"?

I'd have to check what version we changed it, but we did change it so
that it would return the job configuration name. I believe its in the
latest on our site. What version are you using?


Ryan

Peter Steele wrote:
>> Instead of $trace.id, try $trace.name
>>    
>
> No, this doesn't work. The email ends up with lines like this:
>
> Job # BuildLifeJobTrace on <host>:
>
> This is the name of the underlying object it seems, not the name of
the
> job that the trace object encapsulates. Any other options?
>
>
>  
_______________________________________________
Anthill-pro mailing list
[hidden email]
http://lists.urbancode.com/mailman/listinfo/anthill-pro