I have an optional Form Field in my form
name: due
field type: Date
format: yyyy-MM-dd
Using ConfiForms IFTTT Integration Rules
event: onCreated
action: Create JIRA Issue
I'm passing the following:
{
"fields": {
...
"duedate": "[entry.due]",
...
}
}
Since it's an optional field, when I do not fill out value I'm getting the following error:
com.atlassian.sal.api.net.ResponseException: Error communicating with Jira, Bad Request {"errorMessages":[],"errors":{"duedate":"Error parsing date string: "}}
How do I deal with passing optional fields into Creating JIRA issue call?
We have a virtual function to help you specifically with that
"duedate": "[entry.due.jiraDate]"
https://wiki.vertuna.com/display/CONFIFORMS/Virtual+functions
Optional fields can be handled with Velocity templating, as shown here: https://wiki.vertuna.com/display/CONFIFORMS/Configuring+ConfiForms+IFTTT+actions+and+rules#ConfiguringConfiFormsIFTTTactionsandrules-CreateJiraIssue
(unless it is disabled for ConfiForms app by your system admin)
@Alex Medved _ConfiForms_ how do I incorporate the IFTTT rules, this doesn't work
{
"fields": {
"summary": "[entry.title]",
#if(!${entry.due.isEmpty()})
"duedate": "[entry.due]",
#end
"customfield_13162": { "value": "[entry.brand.label]" },
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
{
"fields": {
"summary": "[entry.title]",
#if(${due})
"duedate": "[entry.due.jiraDate]",
#end
"customfield_13162": { "value": "[entry.brand.label]" },
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you see an error from Jira? What kind of error?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Alex Medved _ConfiForms_ ,
I tried this with a date field the same way. It is suppose to be optional and should only provide a date, if the field is filled/ a date is selected. Otherwise there should not be a date parsed to Jira.
However it throws an error regarding the if clause.
Do you have an idea what the issue is? Thanks in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Most probably, in your Confluence instance ConfiForms has an option to evaluate the contents as Velocity template disabled
Could you check with you admins?
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Alex Medved _ConfiForms_ ,
thank you very much! It was indeed disabled. Now its working perfectly!
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.