Quantcast

[sonar-dev] beta review API - review selection criteria for widget

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[sonar-dev] beta review API - review selection criteria for widget

Ann Campbell
I'd like to create a widget to display the reviews associated with my external ticketing system. Since I get to set a property on a linked review, it seems like this should an easy select, but I'm not sure how to accomplish this tidily. It doesn't look like there's anything pre-rolled in the Ruby classes to help with this and instead I'll have to do the same sort of inefficient hack that I used in the widget that shows manual-severity reviews. (Grab all open or re-opened reviews and test each one.)

Am I missing something? Or may I enter a Jira ticket?


Thx,
Ann

--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] beta review API - review selection criteria for widget

Simon Brandhof
Hi Ann,

There are two strategies :
  • Like many other services, precompute a dedicated measure during project inspection. It's limited to a specific project and does not simply allow to cover the reviews of all projects.
  • Directly request the table REVIEWS by filtering the column DATA. It's not perfect because SQL is not really designed for requesting key-value fields : Review.find(:all, :conditions => ["data like '%jira-issue-key=%' and ....."])
Regards

Simon BRANDHOF | SonarSource
http://sonarsource.com



On 28 June 2012 20:48, Ann Campbell <[hidden email]> wrote:
I'd like to create a widget to display the reviews associated with my external ticketing system. Since I get to set a property on a linked review, it seems like this should an easy select, but I'm not sure how to accomplish this tidily. It doesn't look like there's anything pre-rolled in the Ruby classes to help with this and instead I'll have to do the same sort of inefficient hack that I used in the widget that shows manual-severity reviews. (Grab all open or re-opened reviews and test each one.)

Am I missing something? Or may I enter a Jira ticket?


Thx,
Ann

--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] beta review API - review selection criteria for widget

Ann Campbell
Thanks Simon! I'll give the second strategy a try. Since I'm not after a count of linked reviews, so the first one doesn't seem appropriate - unless I'm missing what can be encompassed by "measure" (?)

My goal is to present a reviews widget showing the linked reviews. I've already got web services in place to pull granular tick data from that app, so I'm thinking of trying to pull in the current request status onto that widget. Which is probably pushing the boundaries of what's doable (and wise?) from a widget. We'll see... :-)

On Fri, Jun 29, 2012 at 2:58 AM, Simon Brandhof <[hidden email]> wrote:
Hi Ann,

There are two strategies :
  • Like many other services, precompute a dedicated measure during project inspection. It's limited to a specific project and does not simply allow to cover the reviews of all projects.
  • Directly request the table REVIEWS by filtering the column DATA. It's not perfect because SQL is not really designed for requesting key-value fields : Review.find(:all, :conditions => ["data like '%jira-issue-key=%' and ....."])
Regards

Simon BRANDHOF | SonarSource
http://sonarsource.com



On 28 June 2012 20:48, Ann Campbell <[hidden email]> wrote:
I'd like to create a widget to display the reviews associated with my external ticketing system. Since I get to set a property on a linked review, it seems like this should an easy select, but I'm not sure how to accomplish this tidily. It doesn't look like there's anything pre-rolled in the Ruby classes to help with this and instead I'll have to do the same sort of inefficient hack that I used in the widget that shows manual-severity reviews. (Grab all open or re-opened reviews and test each one.)

Am I missing something? Or may I enter a Jira ticket?


Thx,
Ann

--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************





--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] beta review API - review selection criteria for widget

Ann Campbell
I just tried pulling back the review's data to make it available to my widget & got "association named data not found."

Could this be added in the next version? :-)


On Fri, Jun 29, 2012 at 9:30 AM, Ann Campbell <[hidden email]> wrote:
Thanks Simon! I'll give the second strategy a try. Since I'm not after a count of linked reviews, so the first one doesn't seem appropriate - unless I'm missing what can be encompassed by "measure" (?)

My goal is to present a reviews widget showing the linked reviews. I've already got web services in place to pull granular tick data from that app, so I'm thinking of trying to pull in the current request status onto that widget. Which is probably pushing the boundaries of what's doable (and wise?) from a widget. We'll see... :-)


On Fri, Jun 29, 2012 at 2:58 AM, Simon Brandhof <[hidden email]> wrote:
Hi Ann,

There are two strategies :
  • Like many other services, precompute a dedicated measure during project inspection. It's limited to a specific project and does not simply allow to cover the reviews of all projects.
  • Directly request the table REVIEWS by filtering the column DATA. It's not perfect because SQL is not really designed for requesting key-value fields : Review.find(:all, :conditions => ["data like '%jira-issue-key=%' and ....."])
Regards

Simon BRANDHOF | SonarSource
http://sonarsource.com



On 28 June 2012 20:48, Ann Campbell <[hidden email]> wrote:
I'd like to create a widget to display the reviews associated with my external ticketing system. Since I get to set a property on a linked review, it seems like this should an easy select, but I'm not sure how to accomplish this tidily. It doesn't look like there's anything pre-rolled in the Ruby classes to help with this and instead I'll have to do the same sort of inefficient hack that I used in the widget that shows manual-severity reviews. (Grab all open or re-opened reviews and test each one.)

Am I missing something? Or may I enter a Jira ticket?


Thx,
Ann

--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************





--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720




--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [sonar-dev] beta review API - review selection criteria for widget

Ann Campbell
Nevermind. :-)

On Tue, Jul 3, 2012 at 10:36 AM, Ann Campbell <[hidden email]> wrote:
I just tried pulling back the review's data to make it available to my widget & got "association named data not found."

Could this be added in the next version? :-)


On Fri, Jun 29, 2012 at 9:30 AM, Ann Campbell <[hidden email]> wrote:
Thanks Simon! I'll give the second strategy a try. Since I'm not after a count of linked reviews, so the first one doesn't seem appropriate - unless I'm missing what can be encompassed by "measure" (?)

My goal is to present a reviews widget showing the linked reviews. I've already got web services in place to pull granular tick data from that app, so I'm thinking of trying to pull in the current request status onto that widget. Which is probably pushing the boundaries of what's doable (and wise?) from a widget. We'll see... :-)


On Fri, Jun 29, 2012 at 2:58 AM, Simon Brandhof <[hidden email]> wrote:
Hi Ann,

There are two strategies :
  • Like many other services, precompute a dedicated measure during project inspection. It's limited to a specific project and does not simply allow to cover the reviews of all projects.
  • Directly request the table REVIEWS by filtering the column DATA. It's not perfect because SQL is not really designed for requesting key-value fields : Review.find(:all, :conditions => ["data like '%jira-issue-key=%' and ....."])
Regards

Simon BRANDHOF | SonarSource
http://sonarsource.com



On 28 June 2012 20:48, Ann Campbell <[hidden email]> wrote:
I'd like to create a widget to display the reviews associated with my external ticketing system. Since I get to set a property on a linked review, it seems like this should an easy select, but I'm not sure how to accomplish this tidily. It doesn't look like there's anything pre-rolled in the Ruby classes to help with this and instead I'll have to do the same sort of inefficient hack that I used in the widget that shows manual-severity reviews. (Grab all open or re-opened reviews and test each one.)

Am I missing something? Or may I enter a Jira ticket?


Thx,
Ann

--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************





--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720




--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720




--
G. Ann Campbell
Sr. Systems Engineer, IS Production Systems - Shop Floor Systems
Shaw Industries Inc,
201 S. Hamilton St.
Dalton Ga 30720


**********************************************************
Privileged and/or confidential information may be contained in this message. If you are not the addressee indicated in this message (or are not responsible for delivery of this message to that person) , you may not copy or deliver this message to anyone. In such case, you should destroy this message and notify the sender by reply e-mail.
If you or your employer do not consent to Internet e-mail for messages of this kind, please advise the sender.
Shaw Industries does not provide or endorse any opinions, conclusions or other information in this message that do not relate to the official business of the company  or its subsidiaries.
**********************************************************

Loading...