Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-40428

Issues created via IssueService with default values have Resolution Date set

XMLWordPrintable

      Actually this issue is a composition of few other behaviours, which combined allows to do this.
      1. IssueInputParameters with applyDefaultValuesWhenParameterNotProvided flag set also provides default resolution and resolution date in generated issue input

      2. While creating issue the resolution is discarded but resolution date is not. This caused SW-892

      IssueImpl.java
          public void store()
          {
              try
              {
                  if (!isCreated())
                  {
                      //(...)
                      fields.put(IssueFieldConstants.RESOLUTION_DATE, resolutionDate);
                      //(...)
                   }
                  else
                  {
                      // Otherwise, just update the record of the issue
                      genericValue.store();
                  }
              }
              catch (GenericEntityException e)
              {
                  throw new DataAccessException("Error occurred while storing issue.", e);
              }
          }
      

      3. During issue creation the issue is indexed few times, where the first one still contains resolution set by (1) which sets index for very limited time in invalid state. This probably caused SW-673
      The first reindex:

      The second reindex:

        1. reindex-1.png
          105 kB
          Maciej Nowakowski
        2. reindex-2.png
          113 kB
          Maciej Nowakowski
        3. vertigo-sla.png
          8 kB
          Jóhann B. Guðmundsson

              ohernandez@atlassian.com Oswaldo Hernandez (Inactive)
              mnowakowski Maciej Nowakowski (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: