Skip to main content

10.0.25


REST model on the bitbucket API.


I’m trying to update a record’s Assignee on an issue.


I have the assignee field set up as a reference field like so:


I’m rendering the actual assignee field in a field editor as a picklist, and using a Model to generate the picklist options:


The source model is on bitbucket’s team members.


For some reason with this setup, skuid is including the __skuid_record__ object in the row’s changes, which creates circular reference issues when calling JSON.stringify() as part of the REST save operation:


Here’s the code that’s producing the error:


Skuid never actually gets to the point of trying to perform the PUT.


Help?


Is there a better way for me to set this up?

Attempting to use the “Automatic” option source fails, because for some reason skuid is interpreting the assignee field from bitbucket as a string rather than as an object:



Interestingly, a different model on the same page, with the same source (this one read only to create a list), shows the assignee field as an object:


That’s what I need for the model in the OP! How can I get skuid to re-interpret or fetch new metadata for my model so that it correctly understands that assignee is actually an object and not a string?


Ah, looks like the Composer Settings field on the Page object is what I needed!


Well, having the assignee field as an object instead of text is nice, but it’s not getting me anywhere.

Any guidance on setting up a reference field for a REST model like this?


Well, look like if I just set the assignee.username field to render as a picklist, with my Team Members model as a picklist options source, things seem to work out just fine.


It would still be nice to know how to actually set up a reference field on a REST model like this.


Matt~

Sounds like you were able to answer your own question eventually? Just want to confirm you’re all set. We will bring this idea up with our documentation team. 

Thanks!
Karen 


I’ve got it working now after a lot of trial and error. it would be great if skuid could document reference fields for rest models more thoroughly, and explain the circular JSON error I described.


Reply