Jira Force Sync

Force Sync Manually through UI

To sync the data of the already linked Jira project,

1. Go to Projects > Project / Release / Cycle in QMetry.

2. Open the Integration tab. Click the Sync button against your Jira Project to sync the requirements and issues from Jira.

A. Sync All: Enabling this check-box and clicking the sync will sync complete data between QMetry and Jira (syncing all the Jira assets to QMetry).

B. Sync: Clicking on the sync button without enabling the Sync All check-box would just sync the updated assets from Jira. The "Sync" option should be used when there are structural changes made in Jira like adding new fields, updating the existing fields in Jira layouts, or when the QMetry-Jira integration was stuck or broken due to some reason.

 

Force Sync Utility

The Utility enables users to force sync multiple Jira projects integrated with QMetry Projects at a time. It evades manual intervention that is required to sync Jira projects for each QMetry project that could have multiple Jira integrations/Jira projects integrated with it.

Download Jira Force Sync Utility

The following is the zip file containing the utility folder.

Prerequisites

Update configuration file (properties.cfg)

  • qtmUrl (Mandatory): QMetry Test Management URL

  • qtmApiKey (Mandatory) : Open API Key(of Admin) (Log in to QMetry Test Management > Home > Custom Configuration > Open API)

  • syncTimeout (Optional - Default value - 10) : Sync Timeout for each JIRA Project. The utility would wait for Sync to get completed for the given syncTimeout value. The value should be in minutes format and greater than 1 as polling time is set to 1 minute.

Sample properties.cfg

* qtmUrl : <https://demo.qmetry.com/> * qtmApiKey : HN54FnhO9r3Gl12b0F79Xuk1DHFTlRRzhfKXFeBn * syncTimeout : 2

Execute Utility

python syncUtility.py or python3 syncUtility.py

Post execution files

  • log file will be created after each execution at .\logs\

  • Passed_Projects<timestamp>.csv and Failed_Projects<timestamp>.csv will be created after each execution at .\projectstatus\

 

Notes

  • It is mandatory to provide qtmApiKey of an admin user as the admin only would have access to all the projects.

  • Force Sync utility won't work if automatic sync is in progress for a particular JIRA project. If utility gives error '{"success":false,"code":"CO.SAVE_AND_ACTIVATE_INPROGRESS_SO_CANNOT_START_SYNC","message":"Syncing with JIRA is in-progress at the moment. Please wait until the process is finished."}', then wait for some time and re-run the utility.

  • syncTimeout will be considered for one Jira project. The sync process for one JIRA project would run for maximum up to the given syncTimeout. If Sync is completed before the given syncTimeout value, the utility will move to the next project. If Sync is still in progress and timeout happens, then the utility will quit the process of the current project and move to the next project.