I am submitting this from my personal account, but this issue pertains to our enterprise license. I will request our company administrators log an issue with Atlassian support and link to this post.
The Jira project connected to the issue collector has the Description set to Required and does not allow submissions with an empty Description field. However, when the submitter enters a value for either fullname or email address, the issue collector submits the form even when the Description is empty.
I've tried to intercept this in the front end by ensuring the Description field isn't empty before submitting the form, but as the fault appears to be how Jira responds to the REST call, I'm not sure of any possible ways to do this.
The following code is similar to the default code provided by the Issue Collector page. I've removed details related to my site to show the general use case.
async function updateFieldValues(id) {
// code that updates fields
// when description is empty, it is set to null
window.ATL_JQ_PAGE_PROPS.<<field name>> = <<default value>>
window.ATL_JQ_PAGE_PROPS.description = null
}
$(async () => {
$.ajax({
url: "<<issue collector hostname/collector id>>",
type: "get",
cache: false,
dataType: "script"
})
window.ATL_JQ_PAGE_PROPS = $.extend(window.ATL_JQ_PAGE_PROPS, {
triggerFunction: function (showCollectorDialog) {
$("<<element identifier>>").on('click', async function (e) {
e.preventDefault()
await updateFieldValues(e.currentTarget.id)
showCollectorDialog()
})
},
fieldValues: {}
})
})
1. Trigger the issue collector.
2. Leave the fields Description, Name, and Email Address empty.
3. Submit the form. The system shows the error Description is required.
4. Trigger the issue collector again.
5. Leave Description empty, and enter a value in either Name or Email Address.
6. Submit the form. The system submits the form completely without error.
Hi @codemaestro
If user enters value in Name and Email the default field of the Issue Collector Template as shown in below screenshot, then Issue Collector appends the entered value to the end of the Description field. That is the reason why by leaving Description empty, and entering a value in either Name or Email submits the form without error.
Regards,
Ashish
If that's the case, @Ashish Bijlwan, then this is definitely a bug that the product team should address. The Name and Email fields are only used to support automating the Reporter name in the work item. They should not be considered as part of the required Description field.
However, I would accept an answer that provides a code example of how to block the client from submitting the form unless specific criteria were met. Can you or anyone else help me with this request?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @codemaestro
I would suggest to create a new custom field/s to collect specific peace of information/s from client and make it required from field configuration.
Once the field is set up, add it to the Issue Collector form. This ensures that the client cannot submit the form without providing the required information.
For reference, please see the screenshot below. I’ve added a custom field named "Detail_Information" and marked it as required. During testing, I left this field blank while filling in the "Name" field, and the form could not be submitted—confirming that the required field validation works as expected.
Regards,
Ashish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That’s an interesting approach, thank you, @Ashish Bijlwan . This just might work!
But it still shows that Atlassian’s issue collector has a bug by including the email fields as part of the description, when they are used for other things. I would still like someone at Atlassian to fix the bug I had our team report to our Support rep.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.