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

Request reference to the Issue object in the CustomFieldType interface method validateFromParams

    XMLWordPrintable

Details

    • We collect Jira feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

    Description

      NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.

      Previous issue JRA-19321 was closed without resolution, but numerous questions in answers.atlasian.com point to this being a common need.

      Oddly I get exactly what I want from JIRA started by the SDK (v6.2.1#6256-sha1:f72b283), just not running instances.

      see

      SDK provides Issue in relevantParams

      [INFO] [talledLocalContainer]  Keys for 'relevantParams'
      [INFO] [talledLocalContainer]  ====================KEY: null
      [INFO] [talledLocalContainer]  ====================KEY: issue
      [INFO] [talledLocalContainer]  ====================KEY: requireProjectIds
      

      Standalone JIRA does not

      [INFO] [talledLocalContainer]  Keys for 'relevantParams'
      [INFO] [talledLocalContainer]  ====================KEY: null
      

      A custom field may be sensitive to the project context of the issue currently being validated. For instance I would like to get the list a actors associated with a project role of the project referenced by the issue being validated. The CustomFieldType interface method "public void validateFromParams(CustomFieldParams relevantParams, ErrorCollection errorCollectionToAddTo, FieldConfig config)" does not pass the Issue reference so I can't determine the projectId. I have tried different hacks to get access to the current issue (i.e. getting the "EditIssue" action from the Action context. The problem here is that if you edit another issue in another browser tab of the same browser, the second issue will overwrite the "Edit Issue" Action before the first Issue is validated.
      If system field types get an Issue reference in the validation method why don't custom field types.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              44f3cd099ed9 EddieW
              Votes:
              4 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: