ConfiForms: Remove blank fields in Jira issue?

Ian Taylor March 29, 2022

Hi there,

I have a ConfiForm for my communications team that takes intakes and sends them to Jira as issues. 

There are quite a few fields on this form, and several of them are conditional on the team being engaged (eg. The "Event Type" field only appears when selecting "Events" as the team engaged). 

However, ConfiForms currently sends every single field to Jira whenever it creates an issue. The result is that, say, a Communications request will show up with several blank fields pertaining to Events.

Is there a way to hide unused fields (text, checkbox, and date) so that my team will only see relevant information in Jira? 

Here is my code:

 

{    "fields": {       "project":       {           "key": "WAC"       },

      "issuetype"         : { "name": "Request" },
           
"components"	:	[[entry.TeamEngaged.asArrayOfKVPairs(name)]],						
"customfield_11413":				"[entry.duedate.jiraDateTime]",	
"customfield_18601"	:	"[entry.email]",
"customfield_18600"	:	"[entry.enteredby]",
"customfield_18606"	:	"[entry.LOB]",
"summary"			:	"[entry.InitiativeName.escapeJSON]",




"description": "*Subject Matter Expert:* [entry.SME.escapeJSON] \n *Approved By:* [entry.Approver.escapeJSON] \n \n *Communications: Project* \n *Target Audience:* [entry.TargetAudience.escapeJSON] \n *Communication / Project Overview:* [entry.Communication.escapeJSON] \n *Which strategic priority does this communication align to?:* [entry.StrategicPriority.asArray(_)] \n  \n \n *Communications : Dispatch*  \n *Which weekly communication do you want this featured in? Click all that apply.:* [entry.WeeklyCommunication.asArray(_)] \n *Category:* [entry.Category.asArray(_)] \n *Title:* [entry.Title.escapeJSON] \n *Summary:* [entry.Summary.escapeJSON] \n *Action:* [entry.Action.escapeJSON] \n *Contact:* [entry.Contact.escapeJSON] \n \n *Communications : Bi-weekly Marketing Dispatch* \n *Which weekly communication do you want this featured in? Click all that apply.:* [entry.BiweeklyCommunication.asArray(_)] \n *Title (Marketing):* [entry.MarketingTitle.escapeJSON] \n *Summary (Marketing):* [entry.MarketingSummary.escapeJSON] \n *Action (Marketing):* [entry.MarketingAction.escapeJSON] \n *Publication Date (Marketing):* [entry.MarketingPublicationDate.jiraDate] \n *Contact (Marketing):* [entry.MarketingContact.escapeJSON] \n \n *Event*  \n *Event Type:* [entry.EventType.asArray(_)] \n *Estimated Budget:* [entry.Budget.escapeJSON] \n \n *Colleague Experience / R&R* \n *Initiative Type:* [entry.InitiativeType.asArray(_)] \n *Initiative Pillar:* [entry.InitiativePillar.asArray(_)] \n \n *Additional Information:* [entry.AdditionalInfo.escapeJSON]"
}
}

Thank you.

1 answer

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.
March 30, 2022
Confi User June 20, 2022

Is there a way to make complex logic in the JSON? Like I have a ton of optional fields that depend on other criteria to be met first.

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.
June 21, 2022

Hi

This is exactly what my previous comment answers... Really hard to add anything

Please see the links mentioned there

Alex

Like Confi User likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events