I'm trying to set a default value to Jira if a confiforms text input is empty. I have tried various ways but it does not save the value of the textbox in Jira if the textbox was empty on submit.
Field macro:
MyInput (text)
Rules macro:
Field name - MyInput
Condition - MyInput:[empty]
Execute only on user action - checked (I do not want to show this default value on the form)
Action to execute - set value (or set value if empty)
Values to set - MyInput=No Value Specified
The issue is successfully created in Jira but the value set in the confiforms rules macro does not get saved in the Jira issue.
Hi @Alex Medved _ConfiForms_ Yes this is about confiforms plugin. I've edited the title to indicate that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK, will add a relevant tag/label as well
However, I dont quite understand this question in the ConfiForms context.
How is this related to a Jira issue you have mentioned? Does your form creates a Jira issue on form submit and all you want is to save back the Jira issue key of the created issue? Is that what you want?
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The form creates a Jira issue.
The form has a textbox that isn't required to have a user input.
Upon submit, if the user did not input any value in that textbox, then save a default value value to Jira for that field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What does it mean
save a default value value to Jira for that field
Save something into Jira ticket? Updating Jira ticket?
Or when you create a Jira ticket and the value in ConfiForms for some field is empty then something else should be saved to Jira?
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Only on save. No update.
Or when you create a Jira ticket and the value in ConfiForms for some field is empty then something else should be saved to Jira?
This.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So, this question is about how to map a value for some field in JSON mapping?
How is this done now?
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The mapping is done in the IFFFT macro.
Example:
I have a textbox on the form to capture info. The form field is not required. This form field is mapped to the Acceptance Criteria Jira field.
Hence if the user submits the form without a value in that form field, then I'd like to save the text "No Value Specified" in the Acceptance Criteria Jira field.
If the user does input a value in the form text box, then that value is saved to the Jira Acceptance Criteria field. <- I have this working fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I will try again...
So, how do you have this currently in your JSON mapping?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mapping as follows:
{ "fields" :
{ "project": { "key": "[entry.JiraProjectKey]" },
"issuetype" : { "name": "[entry.IssueType]" },
"summary" : "[entry.Summary.id.escapeJSON]",
"customfield_14400" : "[entry.AcceptanceCriteria.escapeJSON]"
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
#if(${AcceptanceCriteria})
"customfield_14400" : "[entry.AcceptanceCriteria.escapeJSON]"
#else
"customfield_14400" : "No Value Specified"
#end
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Alex!
I was hoping to keep the logic out of the IFFFT macro and do it using the form macros. But I guess doing and IF/Else statement in the IFFFT macro is the way to go.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, you can set up another IFTTT just before the one that runs the "create Jira issue" and set it up in a way that when AcceptanceCriteria is empty then you update the record and set it's value to "No Value Specified"
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you try [null] instead of empty?
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.