Hi there,
I'm quite new to Scriptrunner und just getting started. I want to use the "Send custom email" workflow postfunction of scriptrunner. Everything is almost fine but there remain two problems:
I'm using this body template:
<ul>
<li><b>Summary:</b> ${issue.summary} </li> <br>
<li><b>Issuekey:</b> ${issue.key}</li> <br>
<li><b>Priority:</b> ${issue.priority} </li> <br>
<li><b>Reporter:</b> ${issue.reporter} </li> <br>
<li><b>Created Date:</b> ${issue.created} </li> <br>
<li><b>Description:</b> ${issue.description} </li> <br>
<li><dl>
<dt><b>All Comments:</b></dt>
<br> XXX
</dl> </li> <br>
<li><b>Text123</b> <br> longer text sentence[...]
</li>
</ul>
1) The ouput of "priority" does not work. Neither in the preview nor in a real testmail. There always occurs:
Priority: IssueConstantImpl[[GenericEntity:Priority][sequence,4]statusColor,#EF612C[name,Very High][iconurl,/images/icons/priorities/major.svg][description,][id,10200]]
What am I doing wrong here? I just cannot figure out what is causing this?!
2) I need to include all comments of the issue (incl. a comment added during the transition of the triggering post function). Previously I've used the jmwe email issue postfunction, but it was limited as I need to change the real From-Sender-Address --> therefore I switched to the scriptrunner postfunction.
In the jmwe postfunction I used this code successfully (provided by the jmwe community leader) to catch all comments:
<%= issue.get("comment").collect{"<dd><li>"+it.bodyHtml+"</li></dd>"}.join('\n') %>
This does not work anymore in the template mentioned above.
How can I achieve in the scriptrunner postfunction to include all comments (at position XXX) of the affected issue in the template?
Thank you all very much for your help in advance.
Best regards
Mario
I'm not familiar with the calendar gadget and ultimately, the issue could be with that gadget specifically.
But usually, when I've had issues finding a field in a gadget was because the "searcher" was not set correctly.
So go to custom fields, find your script field in the list. Select Edit from the Action cog and change the search template to "Date Time Range picker".
Depending on what the gadget is designed to filter on, this might work.
I already modified the Search Template based on gadget filter "Date Time Range Picker " I almost tried every searched filter , but of no use . I cannot see my scripted field in dashboard . Could you guide how scripted (date) field can be visible over any dashboard
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This will depend on the design of the gadget.
I don't know which gadgets have the ability to select a custom date field. If you point me to a specific gadget and which add-on provides it, I can run some tests.
On a "Filter Results" gadget I have no problem selecting a scripted date field
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you please test a scripted (date) field to be visible on a jira dashboard particularly jira issues calendar gadget ( field- date drop down) and check whether the scripted (date) field is visible in that drop down
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok, I found and installed the plugin with that gadget.
This gadget doesn't support scriptrunner scripted field.
It would appear that the gadget calls it's own internal API to get the list of valid date fields: <your jira base url>/rest/calendar-plugin/1.0/calendar/htmlcalendar/config/datefields
Which returned just fields of type date. It probably filters custom fields based on the custom field type rather than filtering on search template.
There is nothing you can do with your field as currently designed. The only recourse is to make a request to the maker of the plugin.
But if you really need this functionality, you would have to use a normal date picker field and have a script (perhaps listener) that populates and updates that field as necessary.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.