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

Request form not being updated when removing required option from custom field

      Summary

      when changing the  required option for a custom field used for a request form,  AO_54307E_VIEWPORTFIELD isn't being updated (the cache doesn't appear to be cleared either, therefor you get this error:

       

      This is similar to JSDSERVER-5782 but different as you're not deleting the custom field just changing the required option:

       

      Steps to reproduce 

      1.  Create a new custom field.
      2. Set the custom field to be Required.
      3. Add the custom field to a service desk screen 
      4. Add the Custom field in the Request type field. (Project Settings > Request types > Edit fields > Add field > Select (Custom field).
      5. Set the custom field to Optional
      6. remove the custom field from the service desk screen
      7. try to edit the request type fields

      Expected Behavior

      Service Desk will now allow you to remove the field

      Actual Behavior

      Service Desk throws an error "Cannot delete a field that is required by Jira or Jira Service Desk."

      Cause

      When the custom field is set to optional the REQUIRED field in AO_54307E_VIEWPORTFIELD table isn't being updated for the request type:

      Workaround: 

      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 custom field value and set the required value to 'f'
        UPDATE "AO_54307E_VIEWPORTFIELD" SET "REQUIRED" = 'f' where "ID" =<ID for relevant custom field>';
      4. Either restart JIRA OR to clear the Request form cache simply navigate to another Service Desk project and edit and save a Request Type that is NOT using the same screen as the affected project, this should flush the Request form cache. 

       

       

        1. screenshot-1.png
          91 kB
          Ronnie Volkmar
        2. screenshot-2.png
          69 kB
          Ronnie Volkmar

          Form Name

            [JSDSERVER-6143] Request form not being updated when removing required option from custom field

            Aidan Goldthorpe this is again in 4.5.3 SD

            Richard Bariny added a comment - Aidan Goldthorpe  this is again in 4.5.3 SD

            @Alfonso Leiva,

            Could you please detail this? "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."

             

            Thanks, Chandra.

            Sekhar Chandra added a comment - @Alfonso Leiva, Could you please detail this?  "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."   Thanks, Chandra.

            @RomaIn VELON

            We too having the same problem, cannot simply go through the workaround thing.

            Team, please make this fixed as soon as possible.

             

            Thanks, Chandra.

            Sekhar Chandra added a comment - @RomaIn VELON We too having the same problem, cannot simply go through the workaround thing. Team, please make this fixed as soon as possible.   Thanks, Chandra.

            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.

            Any update on when this will be fixed?

            Narasimha Tunuguntla added a comment - Any update on when this will be fixed?

            Hello,

            We have hundreds of SD projects with the same amount of portals and Request Types. We cannot apply the workaround globally as some teams could have decided to put some fields mandatory on purpose. Your workaround only gives a way to move it from mandatory to optional but then we have to go back to each individual Request Type to put it back mandatory for the portal if required. This is not possible with a huge number of portals.

            Any target date? Thanks.

            Romain

            Romain VELON added a comment - Hello, We have hundreds of SD projects with the same amount of portals and Request Types. We cannot apply the workaround globally as some teams could have decided to put some fields mandatory on purpose. Your workaround only gives a way to move it from mandatory to optional but then we have to go back to each individual Request Type to put it back mandatory for the portal if required. This is not possible with a huge number of portals. Any target date? Thanks. Romain

            Workaround has worked for us. Thanks!

            Leirbag Assuab added a comment - Workaround has worked for us. Thanks!

            The steps to create this are very simple.

            Step 1: Make a custom field "Required" by going to any "Request Type" on JSD project

            Step 2: Remove that custom field from the "Create screen" of issue type associated with Request type

            Step 3: Go to Edit fields on the request type and you will see the error.

            Narasimha Tunuguntla added a comment - The steps to create this are very simple. Step 1: Make a custom field "Required" by going to any "Request Type" on JSD project Step 2: Remove that custom field from the "Create screen" of issue type associated with Request type Step 3: Go to Edit fields on the request type and you will see the error.

              agoldthorpe Aidan Goldthorpe
              rvolkmar Ronnie Volkmar
              Affected customers:
              11 This affects my team
              Watchers:
              20 Start watching this issue

                Created:
                Updated:
                Resolved: