In a REST plugin module, I need to get and set user's properties.
Get works well, with
ComponentAccessor.getUserPropertyManager();
that gives the propertySet.
But how to "set" a new property, and change and existing one, using java api ?
Community moderators have prevented the ability to post new answers.
PropertySet ps = propertiesManager.getPropertySet()(); ps.setString("property.key","value"); String value = ps.getString("property.key");
You can also use Boolean, Date etc in addition to String values.
Hi Jobin
Never thought before it could be so easy ...
Thanks a lot, it works perfectly !
Also, I should by your new version of "Jira Dev Cookbook" ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hope you finds it useful :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jobin
In my case adding a property like this does not make it visible in JIRA . Although adding it to like
ps.setString("jira.meta.key","value");
make the property visible in JIRA.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.