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
Posted Tuesday in Jira

Looking for anyone who made the switch to Data Center

The Jira Marketing team is putting together an ebook on migrating to Data Center. We're looking for pro tips on how you staffed your project team and organized your Proof of Concept. Share yo...

50 views 0 2
Join discussion

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