If you run into a trouble with the Perforce plugin, here are some things you can do to help diagnose the problem.
Check Permissions
If users can not see the Version Control Tab, ensure that the appropriate groups and individuals have the View Version Control permission.
JIRA Search
It is quite possible that a problem you are encountering has been reported previously - so it is always worthwhile checking JIRA for such issues:
Perforce Search - all issues raised against the Perforce plugin project in JIRA
JIRA Search - all issues raised against JIRA mentioning 'perforce' in JIRA
Refresh Indexes
If the index becomes corrupted for any reason, or you wish to remove the index so that JIRA will reindex your Perforce depot completely:
- remove the <JIRA-INDEX-DIR>/plugins/atlassian-perforce-changes directory, where JIRA-INDEX-DIR is the JIRA indexing directory.
- restart JIRA.
Debug Logs
In order to further investigate problems with the JIRA Perforce plugin - it is best to follow these steps:
- Specify a location for the JIRA Perforce plugin logfile through the property p4.logfile properties file
- Configure p4.log_level to only or split
- Configure p4.debug_level to verbose
- Restart JIRA and re-attempt the problem operation
- Examine the generated logs for any obvious problems
The logs may indicate an incorrect setting or other problem preventing correct operation.
Perforce Command Line
It is also useful to test an equivalent operation through the Perforce command in a terminal on the command line. For example, when JIRA connects to the Perforce server for the first time, the following command is executed to retrieve the first batch of change lists:
p4 -s -p <P4PORT> -u <P4USER> -c <P4CLIENT> -P <P4PASSWD> changes -l -s submitted @0,@1000
On Windows
If you are running JIRA on Windows, and if the jira-p4.log file shows that the P4 commands are failing (P4:exit: 1) in the JIRA Perforce plugin, but when you run the same command at the command line it succeeds (exit: 0), make sure that you have uncommented the p4.sysroot and p4.sysdrive variables in perforce-jira-plugin.properties, and set them to the correct values for your system.
Raise a Support Request
It is also useful to verify details displayed in JIRA against the information reported from P4Web or P4DB.
If the cause of the problem cannot be determined, please create a support request,
attaching the JIRA logs, the JIRA Perforce plugin log and properties file with a detailed description of the problem and any side-effects that maybe seen in JIRA or on the Perforce server.
