Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-5782

Unable to edit Request Type field configuration after previously deleting a required custom field

      Summary

      Delete required custom field used for Customer portal will return an error when editing fields in the Request type

      Steps to Reproduce

      1. Create a new custom field.
      2. Add the Custom field in the Request type field. (Project Settings > Request types > Edit fields > Add field > Select (Custom field).
      3. Set the custom field to be Required.
      4. Go to Custom field and delete the custom field
      5. Go back to Request type settings > Edit fields will return error "Cannot Delete a field that is required by Jira or Jira Service Desk"

      Expected Results

      Jira warns the user that the custom field is used by Customer portal and cannot be deleted. If the user deletes the custom field required by Customer portal, the field in Edit field should be shown properly without error.

      Actual Results

      No warning when user deleted required custom field used by Customer portal. If we edit the request type that associated with deleted custom field error below will appear.

      Workaround

      The current workaround is to edit the "AO_54307E_VIEWPORTFIELD" in the database and set the Required value to false.
      The provided queries are tested in PostgreSQL so please tweak the queries according to your database engine.

      1. Run below SQL to list out the Request types in the Service Desk
        SELECT * from "AO_54307E_VIEWPORTFORM";
        

        Take note of the ID of the affected request types

      2. Run below SQL to list all the field in the request type affected.
        SELECT * FROM "AO_54307E_VIEWPORTFIELD" where "FORM_ID" = <ID from Previous query>;
        
      3. Update the deleted customfield value and set the required value to 'f'
        UPDATE "AO_54307E_VIEWPORTFIELD" SET "REQUIRED" = 'f' where "FIELD_ID" = 'customfield_11301';
        

        Please change the "FIELD_ID" to follow your customfield name, in this case the customfield affected is customfield_11301

      4. Restart JIRA.

        1. screenshot-1.png
          14 kB
          Amirul Ikhwan Omar
        2. screenshot-2.png
          55 kB
          Amirul Ikhwan Omar
        3. screenshot-3.png
          52 kB
          Amirul Ikhwan Omar

            [JSDSERVER-5782] Unable to edit Request Type field configuration after previously deleting a required custom field

            lgoodhewcook  we have the same problem on 4.5.3 Jira SD

             

            Richard Bariny added a comment - lgoodhewcook   we have the same problem on 4.5.3 Jira SD  

            Adding my two cents here: I was able to reproduce based on Lakshmi comment here https://jira.atlassian.com/browse/JSDSERVER-6143?focusedCommentId=1907053&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-1907053

            The workaround I used is to search for removed fields from the related screen in the Audit Log, and then put them back, one by one, until the Request Fields section was working back again.

            Alfonso Leiva [ServiceRocket] added a comment - Adding my two cents here: I was able to reproduce based on Lakshmi comment here  https://jira.atlassian.com/browse/JSDSERVER-6143?focusedCommentId=1907053&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-1907053 The workaround I used is to search for removed fields from the related screen in the Audit Log, and then put them back, one by one, until the Request Fields section was working back again.

            We was affected by the slightly different bug explained by @Ronnie Volkmar in previous comments and workaround explained at JSDSERVER-6143 has worked for us.

            Leirbag Assuab added a comment - We was affected by the  slightly different bug explained by @Ronnie Volkmar in previous comments and workaround explained at JSDSERVER-6143 has worked for us.

            I've also created https://jira.atlassian.com/browse/JSDSERVER-6143, which is very similar to this BUG but has a slightly different reproduction pattern, i.e. deleting the field works fine, it's removing it from the screen that is the issue.

            Ronnie Volkmar added a comment - I've also created https://jira.atlassian.com/browse/JSDSERVER-6143 , which is very similar to this BUG but has a slightly different reproduction pattern, i.e. deleting the field works fine, it's removing it from the screen that is the issue.

            VCE added a comment -

            Helpful posting that helped us repairing, but the problem still exists in v7.13 - please fix. Changing objects in the Jira DB to get the problem fixed is not very friendly...

            VCE added a comment - Helpful posting that helped us repairing, but the problem still exists in v7.13 - please fix. Changing objects in the Jira DB to get the problem fixed is not very friendly...

            James H added a comment -

            Hi Atlassian team, you re-opened this then set it to Done again.  This bug persists, please confirm you will fix and release?

            James H added a comment - Hi Atlassian team, you re-opened this then set it to Done again.  This bug persists, please confirm you will fix and release?

            James H added a comment -

            Hi Dina I suggest you raise a new ticket with Atlassian outlining the steps so they can re-open the bug report for you.

            James H added a comment - Hi Dina I suggest you raise a new ticket with Atlassian outlining the steps so they can re-open the bug report for you.

            dina.hall-komkova516792532 added a comment -

            This is still happening!

            dina.hall-komkova516792532 added a comment - This is still happening!

            Hi lgoodhewcook ,

            Our upgrading of software can take along long process. Hence, taking the approach of  workaround.

            As for workaround you mean should patch to f instead of 0?. even thought the required is shown 0?

            Deleted Account (Inactive) added a comment - Hi  lgoodhewcook  , Our upgrading of software can take along long process. Hence, taking the approach of  workaround. As for workaround you mean should patch to f instead of 0?. even thought the required is shown 0?

            kuengnee
            Either solution would fix the issue but I suggest upgrading to one of the listed fix versions rather than using the workaround.

            Lachlan G (Inactive) added a comment - kuengnee Either solution would fix the issue but I suggest upgrading to one of the listed fix versions rather than using the workaround.

              lgoodhewcook Lachlan G (Inactive)
              abinomar Amirul Ikhwan Omar (Inactive)
              Affected customers:
              4 This affects my team
              Watchers:
              33 Start watching this issue

                Created:
                Updated:
                Resolved: