-
Bug
-
Resolution: Won't Fix
-
Low
-
None
-
4.8.0, 4.3.0, 4.2.2, 4.16.1, 5.6.0, 5.4.6
-
41
-
Severity 3 - Minor
-
1
-
Issue description
After migrating Jira from Cloud to Server, Service Desk project administrators might get the "Snap! You can't view this page" error when trying to access any Service Desk specific setting (Request Type, SLA, Automation...).
Diagnosis Steps
To verify if you are impacted by this bug, check if you can find the following error in the file atlassian-servicedesk.log:
2019-07-24 16:53:55,569 JIRA-EventThread-10 ERROR removed XXXXXXX xxxxx XXX.XXX.XX.XXX /plugins/servlet/applications/versions-licenses/add-licenses/jira-servicedesk/evaluation [bootstrap.lifecycle.server.ServerPluginLifeCycle] org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:CustomFieldValue][parentkey,null][customfield,11104][issue,134138][textvalue,{"timeline":{"events":[{"date":1562687139307,"types":["START"]},{"date":1562710975499,"types":["STOP"]}]},"ongoingSLAData":null,"completeSLAData":[{"succeeded":true,"goalTime":28800000,"elapsedTime":22975499,"calendarName":"Sample 9-5 Calendar","startTime":1562687139307,"stopTime":1562710975499}],"metricId":12,"definitionChangeDate":null,"definitionChangeMsEpoch":0,"goalsChangeDate":null,"goalsChangeMsEpoch":null,"goalTimeUpdatedDate":null,"goalTimeUpdatedMsEpoch":null,"metricCreatedDate":null}][id,2292400][updated,1563987235564] (SQL Exception while executing the following:INSERT INTO public.customfieldvalue (ID, ISSUE, CUSTOMFIELD, UPDATED, PARENTKEY, STRINGVALUE, NUMBERVALUE, TEXTVALUE, DATEVALUE, VALUETYPE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "pk_customfieldvalue" Detail: Key (id)=(2292400) already exists.)) com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:CustomFieldValue][parentkey,null][customfield,11104][issue,134138][textvalue,{"timeline":{"events":[{"date":1562687139307,"types":["START"]},{"date":1562710975499,"types":["STOP"]}]},"ongoingSLAData":null,"completeSLAData":[{"succeeded":true,"goalTime":28800000,"elapsedTime":22975499,"calendarName":"Sample 9-5 Calendar","startTime":1562687139307,"stopTime":1562710975499}],"metricId":12,"definitionChangeDate":null,"definitionChangeMsEpoch":0,"goalsChangeDate":null,"goalsChangeMsEpoch":null,"goalTimeUpdatedDate":null,"goalTimeUpdatedMsEpoch":null,"metricCreatedDate":null}][id,2292400][updated,1563987235564] (SQL Exception while executing the following:INSERT INTO public.customfieldvalue (ID, ISSUE, CUSTOMFIELD, UPDATED, PARENTKEY, STRINGVALUE, NUMBERVALUE, TEXTVALUE, DATEVALUE, VALUETYPE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (ERROR: duplicate key value violates unique constraint "pk_customfieldvalue"
Root cause
The root cause is unknown at this moment, as we have been unable to reproduce this issue on Atlassian side. For this reason, it is not guarantee that any customer migrating from Cloud to Server will run into this bug.
Note that a similar bug was reported in the past in https://jira.atlassian.com/browse/JSDSERVER-6538 when customers were migrating from Cloud to Server. However, that bug was fixed in JSD 3.2.6, therefore this seems to be a new unrelated bug.
Workaround
The error in the logs is addressed in the KB article Cannot insert duplicate key in object when adding content to a JIRA application, therefore the resolution steps are the same, except for the affected table which is different.
We have adjusted the steps below for this specific bug.
First, let's confirm that the workaround applies to your situation by following the steps below:
- Connect to the Jira database
- Check the max ID value from the customfieldvalue by running the following query (query 1):
select max(ID) from "customfieldvalue"
- Check the actual sequence from the sequence_value_item table for the Custom Field Value by running the following query (query 2):
select * from "sequence_value_item" where seq_name = 'CustomFieldValue';
- Verify that the max ID from the customfieldvalue table is higher than the value from the sequence_value_item in your database (although in a normal situation, it should be lower). If that's the case, then the workaround below applies to you
Workaround steps:
- Stop Jira
- Backup your Jira database, so that you can revert back the changes if anything goes wrong
- Connect to the Jira database
- Update the sequence_value_item table by running the following query (query 3) and replacing xxxxx with the value from the results of query 1 + 1 (for example, if the result from query 1 was 1000, update xxxxx using 1001):
update "sequence_value_item" set seq_id = xxxxx where seq_name = 'CustomFieldValue';
- Start Jira
- Access a Service Desk project configuration page, and check if you are still facing the same issue
- is related to
-
JSDSERVER-6538 Service Desk functionality fails with error 'You need to be a Service Desk Agent to access this page' after restoring cloud backup to server
- Closed
- is cloned by
-
JSMDC-5087 Loading...
- mentioned in
-
Page Loading...