Hi,
We have an existing own-developed plugin that creates an issue from another issue. This uses issueManager.createIssueObject() and has worked fine up to recently where in some workflows it has just randomly stopped working, even though it is working elsewhere.
Anyway, this made me look at refactoring the plugin to using the IssueService with IssueInputParameters. I have managed to get an issue created and all the system fields copy over fine however using issueInputParams.addCustomFieldValue(String id, String value) isn't copying over the custom field values. It's not giving any errors in the logs and the issue is still created but the customfield values are not being stored on the issue
Code sample as follows, I just simplified it right down to try get it working but to no avail!:
CustomField customField = customFieldManager.getCustomFieldObjectByName("Business Support Estimated");
issueInputParams.addCustomFieldValue(customField.getId(), "3");
Anyone experience the same problem?
Thanks,
Eimear
The value, which you have to provide for the addCustomFieldValue, depends on the type of the custom field. Kindly read my article, on what values you should provide for each custom field (number 3 in my article). Also the field must be on the create screen. And that is the difference with the method, which you used before.
Thanks Alexey, the field not being on the create screen was the issue! :) And your document will come in very handy thanks! :)
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.