How to set default date field on confiforms, or use IFTTT to pick a date if it's blank?

Bill Mills February 26, 2021

Hello,  I have a confluence form with a non-mandatory date field that will only be populated for certain types of requests.  I need this field to feed into the created Jira Issue but unable to map blank fields from confiforms to Jira.   I don't see a way to set a default value in the date field, but I did find the below JSON that advised I can set a default date in the issue creation step:

#set ($thisDATE = "[entry.fldTargetStartDate.jiraDateTime]")

#if ("$!fldTargetStartDate" !="")

 #end

Problem is I don't understand how to integrate this into the IFTTT integration rule.   

The JSON for the field I want to transfer is:

"customfield_11412":"[entry.fldTargetStartDate.jiraDateTime]"

How do I add the #set, #if, #end  scripting into my IFTTT rule, with proper syntax?

Thanks!!

2 answers

0 votes
Marcel Kleinlütke January 7, 2022

I try something that is nearly the same:

I want the user to gibe me a date (Monday of a week) and ConfiForm should generate the dates of Tuesday, Wensday ...Friday in Fields that I want to write into a table.

It works that these dates are entered by clicking into the field but I want less interaction to be nessesscary. Does it work with IFTTT or on a another way just with the ConfiForms that are there?

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 9, 2022

I afraid you will need to have multiple IFTTTs set to run conditionally for creation of each day entry

mydate.formatDate(u)

could get you numeric value for the "day in a week" for given date (in mydate field)

Alex

Like Marcel Kleinlütke likes this
Marcel Kleinlütke January 13, 2022

I did it with multyple IFTTT. I was wondering why but some of my solutions did not work at the first attemp. Without knowing what I did different the second time I think with the same approach and the same configuration and macros it worked.

Do u have sth for try n error people like me... how to debugg a confiform? what to take care of? a special way of sorting, naming?

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 13, 2022
Like Marcel Kleinlütke likes this
0 votes
Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 26, 2021

What is the (business) logic of setting the default date? In other words, how do you know what value to set?

And is this a question about setting the date to ConfiForms field or in Jira JSON mapping?

Bill Mills February 26, 2021

When the field on the form is not completed (blank) I'd like to insert the current date as a default to allow it to transfer to Jira.   

Ideally, if easier, I'd like to set the confiforms date field to a default date of current date, but haven't been able to make it work.  

If that isn't possible, I found the JSON mapping as an alternate way of doing it. 

Thanks!

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 26, 2021

You can set up an IFTTT that Updates your ConfiForms record and sets the "fldTargetStartDate" to current date only if it's empty

Meaning that you put

https://wiki.vertuna.com/display/CONFIFORMS/Configuring+ConfiForms+IFTTT+actions+and+rules#ConfiguringConfiFormsIFTTTactionsandrules-Create(Update)ConfiFormsEntry 

with condition set to: fldTargetStartDate:[empty]

Parameters to set: entryId=[entry.id]&fldTargetStartDate=[entry._now]

Makes sense to set the "Stop events propagation"

 

This IFTTT needs to be placed BEFORE the one that attempts to create your Jira ticket

Alex

Bill Mills February 26, 2021

That did it, thanks for your help!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events