Not able to use .format command for locked fields in Jira

XMLWordPrintable

    • Type: Bug
    • Resolution: Not a bug
    • Priority: Low
    • None
    • Affects Version/s: 8.0.3
    • Component/s: Actions, Smart-values
    • Minor

      Issue Summary

      When trying to create an automation to set Sprint start and end date to two locked fields in Jira, Jira generates an unparsable date error, and only happens if we force a parse date format against those two fields.

      This is reproducible on Data Center: (yes) 

      Steps to Reproduce

      1. To build the scenario first you need to open a sprint for that project.
      2. Create automation where the trigger will be "When: Issue is created"
      3. As action use "Edit issue fields"
      4. In the "More" option, use the same code described below on "Actual Results"
      5. Create a new issue and make sure you are setting the sprint created on step #1 on it.

      Please note this issue was replicated on 8.20 and 9.0 however we had no option to select those versions hence, we did choose 8.0.3

      Expected Results

      As a Jira admin, I expect to use whatever .format to place dates in my date picker fields, including the locked ones (Target Start and Target End)

      Actual Results

      This is what we are trying to pass to the locked fields, please note that we need to change the customField to reflect the correct one for the instance we are trying to replicate.

      {
          "fields": {
              "customfield_10109": "{{sprint.startDate.format("d/MMM/yy")}}"
          }
      } 

      Workaround

      The only known workaround is to use the below code instead with jiraDate

      {
          "fields": {
              "customfield_10205" : "{{issue.sprint.startDate.jiraDate}}",
              "customfield_10206" : "{{issue.sprint.endDate.jiraDate}}"
          }
      }  

       

            Assignee:
            Mateusz Ostaszewski (Inactive)
            Reporter:
            Jose Filho
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: