We are used the Perofrce and Crucible (crucible.py) and try to develop the pre-commit code review system.
After creating the Code Review request by crucible.py file, I want to change the author of Code Review to proper user by CLI, JAVA or REST API.
How can I do that ? can you give me some suggestion ?
If you have example code, please share it to me
Thanks.
Hello Yoo,
This is the latest Crucible REST API reference:
https://docs.atlassian.com/fisheye-crucible/latest/wadl/crucible.html
select cru_user_id, cru_user_name from cru_user;
Now, let's say that the key of the review you've just created is CR-1. This query will tell you what is the author of this review:
select cu.cru_user_id, cu.cru_user_name, cr.cru_name from cru_review cr, cru_user cu, cru_project cp where cr.cru_creator = cu.cru_user_id and cr.cru_project = cp.cru_project_id and cp.cru_proj_key = 'CR' and cr.cru_review_id = 1;
Now you just need to update the author, by running this query:
update cru_review set cru_creator = 2 where cru_review_id = 1;
I hope this helps!
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.