Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




Custom fields in e-mails

emails

Hi.
Is it possible to insert a custom field value to the subject line of an e-mail generated by Gemini?
I'm editing IssueCommentSubjectLine.vm file and everything works fine, but I need to add a name of the customer connected to the issue (a custom field) and I can't find how to do this. I tried $Issue.IssueCustomFieldData[].CustomFieldData but it doesn't work...

Lorentzo

Lorentzo
· 1
Lorentzo
Replies (9)
helpful
0
not helpful

Did you specify the index of the custom field?
$Issue.IssueCustomFieldData[0].CustomFieldData


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Yes, of course :)
I entered $Issue.IssueCustomFieldData[5].CustomFieldData, where "5" is my custom field id. I also tried with a name of the field as an index.

L.


Lorentzo
· 1
Lorentzo
helpful
0
not helpful

That should work. Do you get any errors?
Are you using the scheduler service to send alerts?


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

No errors. I just get "$Issue.IssueCustomFieldData[5].CustomFieldData" string in the subject. I use Mail plug-in, not the scheduler.


L.


Lorentzo
· 1
Lorentzo
helpful
0
not helpful

Can you please post the actual line from the vm file?


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Actual line is quite simple:
[$issue.IssueKey] Commented - $issue.IssueSummary
I' was trying also quite simple:
$Issue.IssueCustomFieldData[5].CustomFieldData  [$issue.IssueKey] Commented - $issue.IssueSummary


Lorentzo
· 1
Lorentzo
helpful
0
not helpful

Ok, this looks like there is an exception. Did you check the Gemini error log?
Please try and check the length of the array first:
$Issue.IssueCustomFieldData.Length  [$issue.IssueKey] Commented - $issue.IssueSummary


Mark Wing
· 9108
Mark Wing
helpful
0
not helpful

Log is clear. It looks like Gemini treats "$Issue.IssueCustomFieldData[5].CustomFieldData" as simple string. The same for "$Issue.IssueCustomFieldData.Length"
Now my mail subject looks like this:
"$Issue.IssueCustomFieldData.Length  [AT-3353] Commented - test"

Maybe I should use any brace brackets or something?
L.


Lorentzo
· 1
Lorentzo
helpful
0
not helpful

Sorry, I think I know why this happens.
With the mail plugin the custom field collection is null.
You can test this by trying to output another field:

$Issue.IssueID


Mark Wing
· 9108
Mark Wing