Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

ConfiForms - Jira Create > Setting a default Due Date or accept blank date if no date selected

GAVIN Benn
Contributor
March 30, 2025

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.

 

Screenshot 2025-03-31 141615.pngScreenshot 2025-03-31 141708.png

2 answers

1 accepted

Suggest an answer

Log in or Sign up to answer
1 vote
Answer accepted
Alex Medved _ConfiForms_
Community Champion
March 30, 2025

Hi @GAVIN Benn 

See https://wiki.vertuna.com/spaces/CONFIFORMS/pages/9864128/Configuring+ConfiForms+IFTTT+actions+and+rules#ConfiguringConfiFormsIFTTTactionsandrules-CreateJiraIssue

You can use the Velocity templating

So just have the 

#if($duedate)
,"duedate": "[entry.duedate.jiraDate(Australia/Melbourne)]"
#end

 

GAVIN Benn
Contributor
March 31, 2025

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!

Alex Medved _ConfiForms_
Community Champion
April 2, 2025

What JSON mapping do you have now?

 

GAVIN Benn
Contributor
April 3, 2025

See screenshot regarding your last comment @Alex Medved _ConfiForms_ 

Also can't seem to past a code block.Screenshot 2025-04-04 120443.png

Alex Medved _ConfiForms_
Community Champion
April 3, 2025

Screenshot 2025-04-04 at 06.47.20.png

See the screenshot above, remove the "comma" from the place shown (it is added by the conditional block later, if needed)

Like GAVIN Benn likes this
0 votes
GAVIN Benn
Contributor
April 13, 2025

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.

 

GAVIN Benn
Contributor
April 13, 2025

@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.

Alex Medved _ConfiForms_
Community Champion
April 13, 2025

What have you tried? Same concept as with a duedate

#if(${startdate}) 
"customfield_14725": "[entry.startdate.jiraDate(Australia/Melbourne)]",
#end

 

TAGS
AUG Leaders

Atlassian Community Events