Fetch Time Spent from Crucible using REST APIs


I am working on review metrics and for that I have to fetch time spent on a Ticket in fisheye ticket through REST API. How can I do that.

Also, in Fisheye, i can submit time on a linked JIRA ticket. Need to fetch that as well



1 answer

Hi Pragati,

I'm sorry to inform currently there is no way of getting the time spent on a review via Rest API. There's a feature request for this which you can see at https://jira.atlassian.com/browse/CRUC-6529, please feel free to vote for it, as well as commenting and adding yourself as a watcher to track its progress.

On it you can find an example to get this information directly from the database:

SELECT b.cru_proj_key,b.cru_number,c.cru_user_name,a.cru_time_spent FROM cru_review_participant a, cru_revpermaid b, cru_user c WHERE a.cru_review_id=b.cru_review_id AND a.cru_user=c.cru_user_id;

As per getting the work done in JIRA side, you would have to use a command from JIRA Rest API. For this I think you could do as follows, in order to get the time spent in a JIRA ticket linked to your Crucible review:

  1. Get the JIRA issue key associated with your review using the Crucible Rest API function /rest-service/reviews-v1/{id}/details - you'll find the JIRA issue associated with this review under the tag jiraIssueKey.
  2. Use the JIRA Rest API function /rest/api/2/issue/{issueIdOrKey}/worklog to get the work done in this JIRA issue.


Gustavo Refosco

Suggest an answer

Log in or Join to answer
Community showcase
Davin Studer
Published yesterday in Confluence

FUME – A Better Confluence User Macro Editor Experience

...\\.title', editorDiv: 'userMacroEditorDiv', isNew: function(){ return AJS.$('#user-macro-form').prop('name') == 'addusermacro' ? true : false; }, editor: null, isDirty...

28 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot