Hi,
I currently have a working ConfiForm that can create a Jira Issue with the selected Start Date and Due Date per user selection on form submission.
There are scenarios where there may not be a Start or End Date known or needed at the point of submission.
As a result, users will receive the below error when trying to submit a request that does not have one of these fields filled.
Hi @GAVIN Benn
You can use the Velocity templating
So just have the
#if($duedate)
,"duedate": "[entry.duedate.jiraDate(Australia/Melbourne)]"
#end
really have thought of everything on ConfiForms I swear. Glad this isn't a default Atlassian App. The support from yourself and the CF crew is amazing.
Does this just go in as part of the JSON in code block or somewhere else?
Pasted in your response and started receiving a JSON error:
Could not complete request (Create JIRA Issue) using configuration id = 349f9875-f286-443f-afcf-8f3c506a1dc8. Requested to https://nbnco.atlassian.net/rest/api/2/issue/ has resulted in error. Response code = 400. Response contents: {"errorMessages":["There was an error parsing JSON. Check that your request body is valid."]}
Also, how does this differ to the function you sent:
#if(${somefield.isEmpty()}) #end
Thanks again!
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.
See screenshot regarding your last comment @Alex Medved _ConfiForms_
Also can't seem to past a code block.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
See the screenshot above, remove the "comma" from the place shown (it is added by the conditional block later, if needed)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks again @Alex Medved _ConfiForms_ that little issue of having an extra , in the wrong place was all I had wrong. Sometimes can't see the Forest for the Trees.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Alex Medved _ConfiForms_ How can I stack these eg, I want to be able to have both Start Date and Due Date apply the same methodology, that if they're blank, the form will still submit.
My Start Date uses this CustomField per previous screenshots:
customfield_14725": "[entry.startdate.jiraDate(Australia/Melbourne)]
I should note, I have tried a few different changes but can't seem to make it work. Either the Start Date, even when populated, won't come through or both the Start Date and Due Date.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What have you tried? Same concept as with a duedate
#if(${startdate})
"customfield_14725": "[entry.startdate.jiraDate(Australia/Melbourne)]",
#end
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.