How to reset a customfield value when "Create Another" option selected in Create Dialog?

When you create a new issue via the Create Dialog, you have the “Create Another” checkbox at the bottom of the dialog which allows you to create a new issue without closing the dialog. This function will clear out the summary and description fields but will keep the other customfields value the same.

One of my customer asked me if it was possible to reset the value of my customfield when he creates another issue. I have found some new interfaces (7.2+) that allows to control how a customfield is cloned but these are not called for the “Create Another” logic. Also, I have tried to find some flags that would be passed to the customfield in the parameters map and other functions but to no avail.

Was someone able to control the customfield value when “Create Another” is selected?

Thanks for any input!

Just went through and looked at how it works. There’s a separate plugin called quickedit (look in the dependencySources folder in the Jira source). It doesn’t look like it really handles the behavior you’re looking for.

From my scanning of the code - it takes the fieldValues that are submitted and then calls the editHtml to get the default values (which is why Summary and Description are empty). Take a look at rest.api.field.QuickEditFields and action.QuickCreateIssue.java for more details about this.

The only thing I can think of is that from looking at the javascript source - it looks to be event driven - so you could could potentially get a callback on the javascript side that would let you reset the form elements. It obviously would be ugly but it’s the only thing I can think off.

1 Like

Thanks a lot Daniel! I will take a deeper look if I can find something that I can hook to from the server side but I doubt it too. I will then take a look to do it on the JS side but like you say, that would be some type of hack :frowning:

Anyway, thanks a lot for the time spend looking into this!