Hi Kieran,

Evergreen's Fieldmapper code tacks those onto the end of the object in
the order: isnew, ischanged, isdeleted.  It's important to note that
while you can skip any trailing null fields to save on data transfer
size, you will need to fill those in in order to use isnew, ischanged,
or isdeleted.

So, if you're using the xml or js fieldmapper to find the correct
array positions for each field, isnew would be -- for the copy of
fm_IDL.xml I have in front of me ATM -- at array index 73 (counting
from 0), ischanged would be at index 74.

HTH,

--
Mike Rylander
 | Research and Development Manager
 | Equinox Open Library Initiative
 | phone:  1-877-OPEN-ILS (673-6457)
 | email:  [email protected]
 | web:  http://equinoxinitiative.org

On Wed, Feb 10, 2021 at 10:50 AM Kieran Pearce <[email protected]> wrote:
>
> Hi Jason,
>
>
>
> This is an admin/staff user editing a patron user. The token is generated 
> using open-ils.auth.login with admin credentials.
>
>
>
>
>
> From: Evergreen-general <[email protected]> on 
> behalf of Jason Etheridge <[email protected]>
> Date: Wednesday, 10 February 2021 at 15:36
> To: Evergreen Discussion Group <[email protected]>
> Subject: Re: [Evergreen-general] How to apply ischanged, isnew to 
> osrf-http-translator reuqests
>
> Hi Kieran,
>
> Just a sanity check; you're not trying to have a user edit their own account?
>
> -- Jason
>
> On Wed, Feb 10, 2021 at 4:06 AM Kieran Pearce <[email protected]> wrote:
> >
> > Hi,
> >
> >
> >
> > Trying to update patron record details with the 
> > open-ils.actor.patron.update function. When making a request to change 
> > first_given_name or email it returns the original unchanged record.
> >
> > We understand that to change details that the ischanged function should be 
> > triggered. Could someone please explain in simple terms how our request 
> > below should be modified so that it triggers ischanged?
> >
> >
> >
> > curl --location --request POST 
> > 'https://evergreen.lib.in.us/osrf-http-translator' \
> >
> > --header 'X-OpenSRF-service: open-ils.actor' \
> >
> > --header 'Content-Type: text/plain' \
> >
> > --data-raw 'osrf-msg=[
> >
> >   {"__c":"osrfMessage","__p":
> >
> >     {"threadTrace":03,"type":"REQUEST","payload":
> >
> >       {"__c":"osrfMethod","__p":
> >
> >         
> > {"method":"open-ils.actor.patron.update","params":["de11763358b0ef1e006a91e2eeb5ed18",
> >  
> > {"__c":"au",,"__p":[[{"__p":["Mailing","Plainfield","US",null,1686689,"46168","IN","1121
> >  STAFFORD 
> > RD.",null,4538858,"t","f",null,"f"],"__c":"aua"}],[{"__p":[],"__c":"ac"}],null,null,null,[{"__p":[],"__c":"aus"},{"__p":[],"__c":"aus"}],[],[],null,[],null,null,"t","Dummy
> >  account1. MS 
> > 1/7/2019","f",{"__p":[],"__c":"aua"},{"__p":[],"__c":"ac"},0,0,"2019-01-07T10:10:10-0500","0.00",null,"1900-01-01","[email protected]",null,"2023-01-15T10:49:20-0500","TEST","STAFF1",37,4538858,1,null,null,null,"1611258822.5923718994.7288487182",{"__p":[],"__c":"aua"},"f",1,null,null,null,null,44,null,1,null,"f",3694213,"21208049372372",null,"f","2021-01-21T14:53:42-0500",null,null,null,null,null,null,null,null,"f",null,null,null,null,null,null,null,null,null,[{"__c":"auact","__p":[]}]]}]}
> >
> >       },"locale":"en-US"
> >
> >     }
> >
> >   }
> >
> > ]'
> >
> >
> > Thank you for your help,
> >
> > Kind Regards,
> >
> >
> >
> > _______________________________________________
> > Evergreen-general mailing list
> > [email protected]
> > http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general
>
>
>
> --
> Jason Etheridge
> Senior Developer
> Equinox Open Library Initiative
> phone:  1-877-OPEN-ILS (673-6457)
> email:  [email protected]
> web:  http://EquinoxInitiative.org
> _______________________________________________
> Evergreen-general mailing list
> [email protected]
> http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general
>
> _______________________________________________
> Evergreen-general mailing list
> [email protected]
> http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general
_______________________________________________
Evergreen-general mailing list
[email protected]
http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general

Reply via email to