JIRA Add User properties by scripting

Hi,

I'm trying to add a new property with a value through a wget script.

I'm trying to run this kind of URL with no success :

http://localhost:$$$$/secure/admin/user/EditUserProperties.jspa?key=<mypropertyname>&value=<myvalue>&name=<myuser>&+Add+=+Add+

I did the autication before that, my script is working except that.

Do you have an idea ?

Maybe you are using another way ?

Regards,

Sven.

2 answers

1 accepted

Greath Thanks Bob.

I found also another way by Jelly using core functionality.

Hey Sven, Can you share the another way of doing it ? pawansonu4@gmail.com

This is working well too :

&lt;JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.enterprise.JiraTagLib" xmlns:core="jelly:core" xmlns:email="jelly:email" xmlns:log="jelly:log" xmlns:util="jelly:util" &gt;
&lt;log:warn&gt;  example log &lt;/log:warn&gt;

&lt;core:invokeStatic className="com.atlassian.jira.component.ComponentAccessor" method="getUserManager" var="usermanager"/&gt;
&lt;core:invoke on="${usermanager}" method="getUser" var="user"&gt;
&lt;core:arg type="java.lang.String" value="myusername"/&gt;
&lt;/core:invoke&gt;

&lt;core:invokeStatic className="com.atlassian.jira.component.ComponentAccessor" method="getUserPropertyManager" var="propertymanager"/&gt;
&lt;core:invoke on="${propertymanager}" method="getPropertySet" var="propertyset"&gt;&lt;core:arg type="com.atlassian.crowd.embedded.api.User" value="${user}"/&gt;
&lt;/core:invoke&gt;

&lt;core:invoke on="${propertyset}" method="setString"&gt;
&lt;core:arg type="java.lang.String" value="jira.meta.myproperty"/&gt;
&lt;core:arg type="java.lang.String" value="myvalueproperty"/&gt;
&lt;/core:invoke&gt;

&lt;/JiraJelly&gt;

No plugin needed

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,284 views 5 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you