Issue created with empty mandatory fields

Originally asked by maya on 10 September 2019 (original question)


Hi all,

We establish a local connection.
when Exlatae opening a Jira (automatically, from the trigger) the Jira is opened without fill some mandatory field.

  • Setup sync with a project which has mandatory fields in the field config
  • sync an issue which creates an issue in the project
  • It succeeds which is unexpected

Thanks,

Maya


Answer by Francis Martens (Exalate) on 10 September 2019

The exalate for Jira Server/Datacenter is currently using the issuemanager interface to create issues.

This interface doesn’t enforce the fact that some fields are mandatory, and hence you might end up with an issue where these fields are empty.

As a best practice - ensure that for each of these fields a default value is set.

For instance - if the description is mandatory please add following code

/*
** Assume that the issue.description is mandatory.  
** In case that the incoming message has no description set, ensure that 
** a description is given (using the elvis operator)
*/

issue.description = replica.description ?: "No description provided"

PS. Description of the elvis operator ( ?: ) can be found here. It is called as such because it looks like an elvis emoticon.


Comments:

maya commented on 15 September 2019

Thanks.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.