Field does not belong to the Request Type.

Jean February 22, 2018

Hi, All.

 

I'm trying to edit the fields of a custom Request Type, I'm getting an error saying: "Field does not belong to the Request Type."

 

Does anyone know how to solve this?

 

3 answers

2 votes
Austin Boyd May 7, 2018

Having this same issue, I've figured out an easier solution to the issue that doesn't require connecting to the database.

The root of the issue has to do with the Field Configuration associated to the project and issue type. What happened to me is the Summary field was NOT set to Required in the database for my Field Configuration, even though it still shows on the screen as required. Since the Summary field is always Required by default and is not editable so it could have been an add-on I have installed that may have changed it on the database side. 

Here's how to fix it: 

  1. Identify the field configuration associated with the problem issue type for the project from the project admin panel
  2. Note all fields that have been manually set to Required
  3. Create a new Field Configuration scheme (do not copy or the problem will persist)
  4. Update new Field Configuration with any fields that have been manually set to be required from the problem Configuration
  5. Associate the new Field Configuration to the Scheme that is tied to the issue type and project.
  6. Delete the problem Field Configuration

 

If you want to, you can certainly query the database for which Field Configurations are affected by this problem:


select * from fieldlayoutitem where isrequired = 'false' and fieldidentifier = 'summary';

Ramin Ghanbari May 8, 2018

Cheers! This actually works.

Austin Boyd September 14, 2018

@Nightcrawler using an SQL query isn't recommended if you can avoid it, especially on a production server. The steps above allow you to fix the issues for that issue type permanently. 

Nightcrawler September 14, 2018

Ya you right and it also prevents you from restarting the Jira instance. Great for staging but ill use your method to repair our prod instance.

0 votes
Austin Boyd April 27, 2018

I figured out a workaround for this but the root issue still remains. For each new Request I make, I have to follow these steps. This workaround requires access to the database and to modify the database. 

Please perform this in a test instance to verify this works for you before making edits in your production instance. Atlassian does not support database modification.

 

1. Identify the ID of the broken request and one request that is working. You can find this in the URI when you try to edit the fields on the Request Type. (my working one is 375 and broken is 374).

2. Shutdown JIRA

3. Verify that the ID comes up with the following SQL query (374): 

select * from "AO_54307E_VIEWPORTFORM" vpform left join "AO_54307E_VIEWPORTFIELD" vpfield on vpform."ID"=vpfield."FORM_ID" where vpform."ID" = null;


CALL_TO_ACTION | DESCRIPTION | ICON | ID | INTRO | ISSUE_TYPE_ID | KEY | NAME | VIEWPORT_ID | FORM_ORDER | ICON_ID | | DESCRIPTION | DISPLAYED | FIELD_ID | FIELD_TYPE | FORM_ID | ID | LABEL | REQUIRED | FIELD_ORDER
----------------+-------------+------+-----+-------+---------------+--------------------------------------+-------+-------------+------------+---------+-------------+-----------+----------+------------+---------+----+-------+----------+-------------
| | | 374 | | 13205 | 1be66466-2020-4430-9f0b-beaa6fd833e7 | test request | 2 | 0 | 27832 | | | | | | | | |
(1 row)

you may see multiple entries here if you have multiple broken requests.

The problem is that there isn't any entry for the Request Type in the table AO_54307E_VIEWPORTFIELD meaning that not even the required Summary field has not been added to the Request Type. 

 

4. Compare the Request Type ID to a known and working Request Type (375).

select * from "AO_54307E_VIEWPORTFORM" vpform left join "AO_54307E_VIEWPORTFIELD" vpfield on vpform."ID"=vpfield."FORM_ID" where vpform."ID" = 375;


CALL_TO_ACTION | DESCRIPTION | ICON | ID | INTRO | ISSUE_TYPE_ID | KEY | NAME | VIEWPORT_ID | FORM_ORDER | ICON_ID | DESCRIPTION | DISPLAYED | FIELD_ID | FIELD_TYPE | FORM_ID | ID | LABEL | REQUIRED | FIELD_ORDER
----------------+-------------+------+-----+-------+---------------+--------------------------------------+---------+-------------+------------+---------+-------------+-----------+----------+------------+---------+------+---------+----------+-------------
| | | 375 | | 10400 | f62a2412-456c-47b8-a3e3-b668d800fb20 | bkjbkhk | 2 | 0 | 27832 | | t | summary | text | 375 | 1935 | Summary | t | 0

 

The columns on the right should have data in them, and may display multiple rows.

 

5. Insert data into the table AO_54307E_VIEWPORTFIELD (change the ID to your own ID):

 

INSERT INTO "AO_54307E_VIEWPORTFIELD"("DISPLAYED", "FIELD_ID", "FIELD_TYPE", "FORM_ID", "LABEL", "REQUIRED", "FIELD_ORDER")
VALUES
('t', 'summary', 'text', 374, 'Summary', 't', 0);
INSERT 0 1

This SQL should only insert the minimum information for the default required field Summary to the table. 

 

6. Verify that the data is shown correctly:

select * from "AO_54307E_VIEWPORTFORM" vpform left join "AO_54307E_VIEWPORTFIELD" vpfield on vpform."ID"=vpfield."FORM_ID" where vpform."ID" = 374;
CALL_TO_ACTION | DESCRIPTION | ICON | ID | INTRO | ISSUE_TYPE_ID | KEY | NAME | VIEWPORT_ID | FORM_ORDER | ICON_ID | DESCRIPTION | DISPLAYED | FIELD_ID | FIELD_TYPE | FORM_ID | ID | LABEL | REQUIRED | FIELD_ORDER
----------------+-------------+------+-----+-------+---------------+--------------------------------------+-------+-------------+------------+---------+-------------+-----------+----------+------------+---------+------+---------+----------+-------------
| | | 374 | | 13205 | 1be66466-2020-4430-9f0b-beaa6fd833e7 | ghjkh | 2 | 0 | 27832 | | t | summary | text | 374 | 1937 | Summary | t | 0

 

7. Start JIRA  

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 26, 2018

Hi Jean,

I have not seen this specific error before with Service Desk, but I am curious to learn more about your environment to see if we can help.  The error suggests that this request type might currently contain a field that should not be possible. 

Perhaps a custom field was removed or changed on the back end of things in Jira and the request type simply has not been updated to be aware of this.

When exactly do you get this error?  Is it upon editing the request type, or trying to save changes to a request type?

Could you grab a screenshot of this error?  Perhaps we can better also understand what fields exist on this particular request type to help narrow down what could be the problem here.

Is this for Jira Cloud or Jira Server?

If this is Server, please let me know what versions of Jira and Jira Service Desk you have.

Also if this is server, it might also help try to run through the database integrity checker in Jira. 

Jean February 27, 2018

Hi, Andrew.

The environment is JIRA Server version 7.7.

The error occurs whenever we try to edit a newly created Request Type with a specific Issue Type - "Access". Access fresh screen scheme with new custom fields and system fields.

We have tried removing all custom fields in the screen as well as adding all system fields, we're still getting the same error message whenever we associate "access" to a Request Type.

We run the integrity checker and found no error

Jean February 28, 2018

Hi, Andrew.

 

When I create a new Request Type with existing Issue type (not custom), I'm getting the same error whenever I try to edit the fields.

 

2018-03-01 15_21_11-Edit Request Type Group - Service Desk.png

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 1, 2018

Hi Jean,

I have not been able to recreate this problem.  Nor can I find any other reported cases of this error on our private support tracker.

Could you grab a screenshot of this specific error when you try to edit this request type?

I'd also like to see what fields do show up on that request type if possible.

In addition to these, it might help to recreate this error once more, and then quickly look into the logs of Jira.  These are located on the Jira server under the $JIRAHOME/log/ folder.   I would be interested to see the atlassian-jira.log and the servicedesk log file from that time to see if the log files might tell us more about what field could be causing this error.

If you do not have direct access to your Jira server logs yourself, it would help to make a note of what time you recreated this error so that when looking through the logs later you can better see the timestamp of the log entries to see if there exists any error, warn, info messages generated at that time.

Ramin Ghanbari April 26, 2018

newRequestType.gif

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 26, 2018

@Ramin Ghanbari and @Jean

Are your Jira environments by chance using the plugin Extension for Jira Service Desk?   I found a few other customers that have reported this error on our support tracker.  While we have not yet clearly identified the cause of this behavior, I did find a commonality of the use of this plugin between these environments.

If yes, could you try to disable this plugin temporarily and then see if you can recreate this problem with a newly created request type.

If no, could you go to Gear icon -> Add-ons -> Manage Addons, then filter by user-installed addons and let me know the list of the plugins you are using in this environment.

I am curious to see if this plugin or some other plugin might be a factor in this problem.

Austin Boyd April 27, 2018

I'm having the same issue. @Andy Heinzer I am working with Eric Storch on SDS-31915.  I have (and disabled) Extension with no different results. 

Nightcrawler September 14, 2018

We are having the same issue. We are currently on a trial version of "Extension for Jira Service Desk" and we can't say if the issue appeared before or after we installed that plugin. However, after disabling it, it didn't solve the issue nor after uninstalling it. 

 

@Austin Boyd Any feedback from your Service Desk request on that problems?

Using:
JIRA Service Desk 3.14.2
Jira Software 7.11.2

RG December 19, 2023

@Austin Boyd Hi Austin,

 

In our case Description field id required in customer portal but not in project, but we getting error message in one project and one is working fine, I tried your workaround and its working but in our case users sent directly attachment via email to our projects in this case how to fix this issue.

Suggest an answer

Log in or Sign up to answer