based on radio option selected by user in cofiform, assign the jira ticket created to 3 specific use
Asked by Anand K:

hi Team, I am trying to create a confiform for my team, where the team submits a form and a Jira ticket is created. i am struggling with **2 issues**.

1. making **Due date field is optional**- if users leave it blank if am getting an error message as i cannot make the due date field optional in JSON- is there a way to mark the code to optional and only work when the field has value.

2. when users select any 1 out of 5 radio buttons- depending on the selection it has to select to sepecific user1 , user2 or user3 and add to **ASSIGNEE** in Jira

any help is much appreciated.

```
{  "fields": {    "project": {      "key": "Anand's Project"    },    "summary": "[entry.tbSummary]",    "description": "h2.Requestor \n *Name:* [entry.tbName] \n *Email:* [entry.tbEmail] \n *C/D#:* [entry.tbID] \n \n h2.Details \n *Description*: \n [entry.taDesc.escapeJSON] \n *Deliverables Required*:[entry.textdeliverables.escapeJSON] \n  *Type of Request*: [entry.radiorequesttype] \n *Is there a specific deadline that needs to be met?:* [entry.texttargetdateYN] \n *Target Launch Date*: [entry.texttargetdate]",    "reporter": {      "name": "[entry.tbID]"    },    "issuetype": {      "id": "6"    },     "duedate": "[entry.texttargetdate.jiraDate]",    "priority": {      "name": "[entry.radiobusinesspriority]"    }  }}
```


Answers:
author: Benjamin
body: Hi [@Anand K](/t5/user/viewprofilepage/user-id/5483806) ,

Here's a post about the 1st issue:

<https://community.atlassian.com/t5/Jira-Software-questions/How-to-deal-with-optional-confiForms-fields-when-passing-data-to/qaq-p/1457072>

comments: author: Anand K
body: Thanks [@Benjamin](/t5/user/viewprofilepage/user-id/3275402) - it worked for the 1st issue- appreciate your timely response!! thanks heaps


author: Alex Medved _ConfiForms_
body: Hi [@Anand K](/t5/user/viewprofilepage/user-id/5483806)

You can use velocity templating inside the ConfiForms IFTTT macro to dynamically create a JSON mapping

<https://wiki.vertuna.com/display/CONFIFORMS/Configuring+ConfiForms+IFTTT+actions+and+rules#ConfiguringConfiFormsIFTTTactionsandrules-CreateJiraIssue>

For the assignee field you can use the same approach

Alex

comments: author: Anand K
body: apologies [@Alex Medved _ConfiForms_](/t5/user/viewprofilepage/user-id/781630) . this is fairly new to me. Could you help me with an example please?

User selected the *Type of request Radio button* (between 1 and 5)and depending on that Jira ticket (which is created) has to be assigned to respective user. Would you be able to draft up a sample mapping for below example?

Option "1": "User1",

Option "2": "User2",

Option "3": "User3",

Option "4": "User3",

Option "5": "User1",


author: Alex Medved _ConfiForms_
body: ```
#if(${yourradiofield} == '1')
 "assignee": {
  "name": "User1"
 },
#elseif(${yourradiofield} == '2')
"assignee": {
"name": "User2"
},
#end

```


author: Anand K
body: Thanks heaps [@Alex Medved _ConfiForms_](/t5/user/viewprofilepage/user-id/781630) This helped complete the code. thanks again for your quick response.


author: Anand K
body: [@Benjamin](/t5/user/viewprofilepage/user-id/3275402) - I am also trying to validate to ensure that the due date entered by user is over 5 business days from today? would you be able to help?


Tags: assignee

confiforms

confluence-data-center

data-center

duedate