Editing Perforce job configurations in the JIRA database

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

Perforce job configurations cannot be edited in the JIRA UI, according to the bug ticket :  JRA-33793 - Getting issue details... STATUS

回避策

The Perforce configurations can be directly editted in the JIRA database. 

Notice

Please ensure that to have a backup of JIRA database handy before performing any direct database manipulation. Atlassian will not be held responsible for any lost of data due to the absence of backups.

手順:

  1. Run the following SQL in the JIRA database to pick up all the Perforce configurations:

    SQL
    SELECT propertyentry.ID, propertyentry.ENTITY_NAME, propertyentry.ENTITY_ID, propertyentry.PROPERTY_KEY, propertystring.propertyvalue, propertytext.propertyvalue 
    FROM propertyentry 
    LEFT JOIN propertystring ON propertyentry.ID = propertystring.ID 
    LEFT JOIN propertytext ON propertyentry.ID = propertytext.ID 
    WHERE PROPERTY_KEY LIKE "fisheye.p4%"; 
  2. The results will look like the following:



  3. The first 4 columns come from the propertyentry table which stores the type of configuration for a Perforce job, e.g. port, perforce executable etc. 
  4. The first propertyvalue column stores the config value in the propertystring table, while the second propertyvalue column stores the config in the propertytext table. 
  5. The property_key column is self explanatory, with the numbering fisheye.p4.X coinciding with the ID of the Perforce job. So if you have 3 perforce job configurations in JIRA, it will show as: 

    fisheye.p4.1.configname
    fisheye.p4.1.configname
    fisheye.p4.1.configname
    fisheye.p4.2.configname
    fisheye.p4.2.configname
    fisheye.p4.2.configname
    fisheye.p4.3.configname
    fisheye.p4.3.configname
    fisheye.p4.3.configname
  6. We can follow this comment to determine which Perforce job configuration is related to which ID, by replacing the URL with the ID as per the PROPERTY_KEY column above.

  7. To change the configuration, refer to the ID of the table above, e.g. ID = 13771 relates to the job configuration charset for the job with ID = 7. Since its value is in the first propertyvalue column, we know that its in the propertystring table.
  8. Run the following to change the value:

    SQL
    UPDATE propertystring SET propertyvalue = 'utf8-bom' WHERE ID = 13771;

    Here we are changing the charset of the perforce job configuration to utf8-bom. 

  9. For configuration with ID = 13766, its the job configuration executable for job ID = 7. Since its value is the second propertyvalue column, we know that its in the propertytext table.

    SQL
    UPDATE propertytext SET propertyvalue = 'c:\Program Files\Perforce2\p4.exe' WHERE ID = 13766;
  10. Finally, restart JIRA for the changes to be applicable.

 

最終更新日: 2016 年 2 月 19 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.