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

Mail handler edit UI breaks when project key is renamed

    XMLWordPrintable

Details

    Description

      Issue Summary

      When a project key is renamed, the mail handler edit UI breaks after we click the first Next button - the edit screen vanishes.

      We can see in a HAR file that Jira sends to the UI the configured (old) project key and a list of the available project keys.

      Apparently, it doesn't check for old project keys, and when trying to match the one configured in the DB with the ones available, it breaks.

      Also, Jira doesn't check the mail handler configs to update them on a project key change.

      Steps to Reproduce

      1. Create a project
      2. Create a mail handler and associate with the project
      3. Change the project key
      4. Attempt to edit the mail handler

      Expected Results

      It works normally.

      Actual Results

      The UI disappears after clicking the Next button.

      No errors are visible, as the error happens in the UI.

      Workaround

      There are 2 possible solutions:

      • Delete the mail handler and recreate it;
        Tip: the SELECT query below gets the mail handler configurations. It might come in handy if/when recreating it.
      • Or update the configs in the database directly:
        Before starting, take a database backup and perform the procedure in staging first.
        • First identify the entry we need to update:
          SELECT *
          FROM propertystring
          WHERE 
          id IN (SELECT id FROM propertyentry WHERE property_key LIKE '%handler%')
          AND propertyvalue LIKE '%KEY%';
          

          Replace KEY in the WHERE clause for the old project key. If in doubt, remove the last line in the query to retrieve all mail handlers.

      • Take note of the ID and copy the propertyvalue we wish to change.
      • Update the desired entry:
        UPDATE propertystring
        SET propertyvalue = '<edited_config>'
        WHERE id = <id_from_query_above>
        
      • Restart Jira

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              5fb7769fcbc7 Allan Gandelman
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: