Re: API+rbtools: Only changing extra_data won't save

2021-05-20 Thread tw bert
Hi Christian,

"It should just instantly be in there." -> correct !
It was just missing knowledge on our part, messing around with draft was 
not necessary.

For future reference:
requests=root.get_review_requests(commit_id='FOO_BAR')
if len(requests) != 1: raise ValueError('revreq with commit_id={} not 
found'.format(repr(commit_id)))
revreq=requests[0]
revreq.update(**{'extra_data:json' : 
json.dumps({'my_dummy_extra_data':'Hello World'}, ensure_ascii=False)})
# And it's there, check at: RB site, Admin (upper right below account icon) 
-> Database -> Review Requests -> pick one -> scroll down -> State "Show" 
-> Extra data.

Thanks for your help, TW


On Thursday, 20 May 2021 at 00:15:02 UTC+2 Christian Hammond wrote:

> Thanks!
>
> It should just instantly be in there. What does the resulting payload from 
> the API call look like? Any changes showing up in extra_data?
>
> Christian
>
> On Wed, May 19, 2021 at 4:08 AM tw bert  wrote:
>
>> Hi Christian, congrats on the RB4 release!
>>
>> We don't have a RB extension, we only want to store some custom data in 
>> extra_data.
>>
>> You mention that it's possible to *not* use a draft in this scenario, and 
>> that's fine. But I must be missing something (probably simple).
>> After:
>> revreq.update(**{'extra_data:json' : 
>> json.dumps({'my_dummy_extra_data':'Hello World' })}) 
>> do I need to submit it? how? It's not reflected in the 'Show state' at 
>> the admin database view.
>>
>> TIA, TW
>>
>> On Wednesday, 19 May 2021 at 12:55:54 UTC+2 Christian Hammond wrote:
>>
>>> Hi,
>>>
>>> This is a server-side issue. Review request drafts need to have a field 
>>> with changed content in order to publish. Is your extra_data backed by a 
>>> custom field provided by an extension?
>>>
>>> If you’re just looking to add arbitrary metadata to the review request, 
>>> you should be able to attach it to the review request directly without a 
>>> draft.
>>>
>>> Christian
>>>
>>>
>>> On Mon, May 17, 2021 at 05:54 tw bert  wrote:
>>>
 When doing the following change:

 draft = revreq.get_or_create_draft()
 revreq.update(**{'extra_data:json' : 
 json.dumps({'my_dummy_extra_data':'Hello World' 
 },indent=2,ensure_ascii=False)})
 draft.update(public=True)

 We get the following response:

 rbtools.api.errors.BadRequestError: You attempted to publish a review 
 request without any modifications. (HTTP 400, API Error 211)

 ---

 (note that we have to use revreq.update() instead of draft.update() , 
 that might be a related quirk. For the workaround below to succeed, draft 
 seems to be ignored but revreq works)

 ---

 If we include a dummy change in (for example) the summary, before 
 public=True, the extra_data is changed as desired.
 For example:
 draft.update(summary=unicode(draft.summary) + u'\U0001f987')

 I don't know if this is a server side issue or an RBTools client issue.

 RB 3.0.20 
 RBTools 1.0.3

 We currently work around this issue by committing/publishing twice (add 
 the bat emoji, and strip it).
 A bit ugly because of the history being shown on RB. But it's workable 
 for us.

 Cheers, Tijs












 -- 
 Supercharge your Review Board with Power Pack: 
 https://www.reviewboard.org/powerpack/
 Want us to host Review Board for you? Check out RBCommons: 
 https://rbcommons.com/
 Happy user? Let us know! https://www.reviewboard.org/users/
 --- 
 You received this message because you are subscribed to the Google 
 Groups "Review Board Community" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to reviewboard...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/reviewboard/6bca1129-4662-4a74-a2c9-2c7d4c4c7a60n%40googlegroups.com
  
 
 .

>>> -- 
>>> -- 
>>> Christian Hammond
>>> President/CEO of Beanbag
>>> Makers of Review Board
>>>
>> -- 
>> Supercharge your Review Board with Power Pack: 
>> https://www.reviewboard.org/powerpack/
>> Want us to host Review Board for you? Check out RBCommons: 
>> https://rbcommons.com/
>> Happy user? Let us know! https://www.reviewboard.org/users/
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Review Board Community" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to reviewboard...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/reviewboard/c5c97e1d-7fbb-487f-b0bd-e89b10cf2d9dn%40googlegroups.com
>>  
>> 

Re: API+rbtools: Only changing extra_data won't save

2021-05-19 Thread Christian Hammond
Thanks!

It should just instantly be in there. What does the resulting payload from
the API call look like? Any changes showing up in extra_data?

Christian

On Wed, May 19, 2021 at 4:08 AM tw bert  wrote:

> Hi Christian, congrats on the RB4 release!
>
> We don't have a RB extension, we only want to store some custom data in
> extra_data.
>
> You mention that it's possible to *not* use a draft in this scenario, and
> that's fine. But I must be missing something (probably simple).
> After:
> revreq.update(**{'extra_data:json' :
> json.dumps({'my_dummy_extra_data':'Hello World' })})
> do I need to submit it? how? It's not reflected in the 'Show state' at the
> admin database view.
>
> TIA, TW
>
> On Wednesday, 19 May 2021 at 12:55:54 UTC+2 Christian Hammond wrote:
>
>> Hi,
>>
>> This is a server-side issue. Review request drafts need to have a field
>> with changed content in order to publish. Is your extra_data backed by a
>> custom field provided by an extension?
>>
>> If you’re just looking to add arbitrary metadata to the review request,
>> you should be able to attach it to the review request directly without a
>> draft.
>>
>> Christian
>>
>>
>> On Mon, May 17, 2021 at 05:54 tw bert  wrote:
>>
>>> When doing the following change:
>>>
>>> draft = revreq.get_or_create_draft()
>>> revreq.update(**{'extra_data:json' :
>>> json.dumps({'my_dummy_extra_data':'Hello World'
>>> },indent=2,ensure_ascii=False)})
>>> draft.update(public=True)
>>>
>>> We get the following response:
>>>
>>> rbtools.api.errors.BadRequestError: You attempted to publish a review
>>> request without any modifications. (HTTP 400, API Error 211)
>>>
>>> ---
>>>
>>> (note that we have to use revreq.update() instead of draft.update() ,
>>> that might be a related quirk. For the workaround below to succeed, draft
>>> seems to be ignored but revreq works)
>>>
>>> ---
>>>
>>> If we include a dummy change in (for example) the summary, before
>>> public=True, the extra_data is changed as desired.
>>> For example:
>>> draft.update(summary=unicode(draft.summary) + u'\U0001f987')
>>>
>>> I don't know if this is a server side issue or an RBTools client issue.
>>>
>>> RB 3.0.20
>>> RBTools 1.0.3
>>>
>>> We currently work around this issue by committing/publishing twice (add
>>> the bat emoji, and strip it).
>>> A bit ugly because of the history being shown on RB. But it's workable
>>> for us.
>>>
>>> Cheers, Tijs
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Supercharge your Review Board with Power Pack:
>>> https://www.reviewboard.org/powerpack/
>>> Want us to host Review Board for you? Check out RBCommons:
>>> https://rbcommons.com/
>>> Happy user? Let us know! https://www.reviewboard.org/users/
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Review Board Community" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to reviewboard...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/reviewboard/6bca1129-4662-4a74-a2c9-2c7d4c4c7a60n%40googlegroups.com
>>> 
>>> .
>>>
>> --
>> --
>> Christian Hammond
>> President/CEO of Beanbag
>> Makers of Review Board
>>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "Review Board Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/reviewboard/c5c97e1d-7fbb-487f-b0bd-e89b10cf2d9dn%40googlegroups.com
> 
> .
>


-- 
Christian Hammond
President/CEO of Beanbag 
Makers of Review Board 

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/reviewboard/CAE7Vnd%3Dr2t5bxD4wgGyaoFZCWqQFyx7HTUR_k-ApEtWJsp4qdQ%40mail.gmail.com.


Re: API+rbtools: Only changing extra_data won't save

2021-05-19 Thread tw bert
Hi Christian, congrats on the RB4 release!

We don't have a RB extension, we only want to store some custom data in 
extra_data.

You mention that it's possible to *not* use a draft in this scenario, and 
that's fine. But I must be missing something (probably simple).
After:
revreq.update(**{'extra_data:json' : 
json.dumps({'my_dummy_extra_data':'Hello World' })}) 
do I need to submit it? how? It's not reflected in the 'Show state' at the 
admin database view.

TIA, TW

On Wednesday, 19 May 2021 at 12:55:54 UTC+2 Christian Hammond wrote:

> Hi,
>
> This is a server-side issue. Review request drafts need to have a field 
> with changed content in order to publish. Is your extra_data backed by a 
> custom field provided by an extension?
>
> If you’re just looking to add arbitrary metadata to the review request, 
> you should be able to attach it to the review request directly without a 
> draft.
>
> Christian
>
>
> On Mon, May 17, 2021 at 05:54 tw bert  wrote:
>
>> When doing the following change:
>>
>> draft = revreq.get_or_create_draft()
>> revreq.update(**{'extra_data:json' : 
>> json.dumps({'my_dummy_extra_data':'Hello World' 
>> },indent=2,ensure_ascii=False)})
>> draft.update(public=True)
>>
>> We get the following response:
>>
>> rbtools.api.errors.BadRequestError: You attempted to publish a review 
>> request without any modifications. (HTTP 400, API Error 211)
>>
>> ---
>>
>> (note that we have to use revreq.update() instead of draft.update() , 
>> that might be a related quirk. For the workaround below to succeed, draft 
>> seems to be ignored but revreq works)
>>
>> ---
>>
>> If we include a dummy change in (for example) the summary, before 
>> public=True, the extra_data is changed as desired.
>> For example:
>> draft.update(summary=unicode(draft.summary) + u'\U0001f987')
>>
>> I don't know if this is a server side issue or an RBTools client issue.
>>
>> RB 3.0.20 
>> RBTools 1.0.3
>>
>> We currently work around this issue by committing/publishing twice (add 
>> the bat emoji, and strip it).
>> A bit ugly because of the history being shown on RB. But it's workable 
>> for us.
>>
>> Cheers, Tijs
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> -- 
>> Supercharge your Review Board with Power Pack: 
>> https://www.reviewboard.org/powerpack/
>> Want us to host Review Board for you? Check out RBCommons: 
>> https://rbcommons.com/
>> Happy user? Let us know! https://www.reviewboard.org/users/
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Review Board Community" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to reviewboard...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/reviewboard/6bca1129-4662-4a74-a2c9-2c7d4c4c7a60n%40googlegroups.com
>>  
>> 
>> .
>>
> -- 
> -- 
> Christian Hammond
> President/CEO of Beanbag
> Makers of Review Board
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/reviewboard/c5c97e1d-7fbb-487f-b0bd-e89b10cf2d9dn%40googlegroups.com.


Re: API+rbtools: Only changing extra_data won't save

2021-05-19 Thread Christian Hammond
Hi,

This is a server-side issue. Review request drafts need to have a field
with changed content in order to publish. Is your extra_data backed by a
custom field provided by an extension?

If you’re just looking to add arbitrary metadata to the review request, you
should be able to attach it to the review request directly without a draft.

Christian


On Mon, May 17, 2021 at 05:54 tw bert  wrote:

> When doing the following change:
>
> draft = revreq.get_or_create_draft()
> revreq.update(**{'extra_data:json' :
> json.dumps({'my_dummy_extra_data':'Hello World'
> },indent=2,ensure_ascii=False)})
> draft.update(public=True)
>
> We get the following response:
>
> rbtools.api.errors.BadRequestError: You attempted to publish a review
> request without any modifications. (HTTP 400, API Error 211)
>
> ---
>
> (note that we have to use revreq.update() instead of draft.update() , that
> might be a related quirk. For the workaround below to succeed, draft seems
> to be ignored but revreq works)
>
> ---
>
> If we include a dummy change in (for example) the summary, before
> public=True, the extra_data is changed as desired.
> For example:
> draft.update(summary=unicode(draft.summary) + u'\U0001f987')
>
> I don't know if this is a server side issue or an RBTools client issue.
>
> RB 3.0.20
> RBTools 1.0.3
>
> We currently work around this issue by committing/publishing twice (add
> the bat emoji, and strip it).
> A bit ugly because of the history being shown on RB. But it's workable for
> us.
>
> Cheers, Tijs
>
>
>
>
>
>
>
>
>
>
>
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "Review Board Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/reviewboard/6bca1129-4662-4a74-a2c9-2c7d4c4c7a60n%40googlegroups.com
> 
> .
>
-- 
-- 
Christian Hammond
President/CEO of Beanbag
Makers of Review Board

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/reviewboard/CAE7Vndm6ep0DQ-FTVOFBR5P82p%3DZkncgb0-dDA6D36JYhunihA%40mail.gmail.com.


API+rbtools: Only changing extra_data won't save

2021-05-17 Thread tw bert
When doing the following change:

draft = revreq.get_or_create_draft()
revreq.update(**{'extra_data:json' : 
json.dumps({'my_dummy_extra_data':'Hello World' 
},indent=2,ensure_ascii=False)})
draft.update(public=True)

We get the following response:

rbtools.api.errors.BadRequestError: You attempted to publish a review 
request without any modifications. (HTTP 400, API Error 211)

---

(note that we have to use revreq.update() instead of draft.update() , that 
might be a related quirk. For the workaround below to succeed, draft seems 
to be ignored but revreq works)

---

If we include a dummy change in (for example) the summary, before 
public=True, the extra_data is changed as desired.
For example:
draft.update(summary=unicode(draft.summary) + u'\U0001f987')

I don't know if this is a server side issue or an RBTools client issue.

RB 3.0.20 
RBTools 1.0.3

We currently work around this issue by committing/publishing twice (add the 
bat emoji, and strip it).
A bit ugly because of the history being shown on RB. But it's workable for 
us.

Cheers, Tijs











-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/reviewboard/6bca1129-4662-4a74-a2c9-2c7d4c4c7a60n%40googlegroups.com.