Hi, I need to create a cookie in user macro environment, I can use the velocity context parameter $req, but this only work to get a cookie, not for create.
Can I do this?
Oh, you want to manage cookies on client side?
You can store cookie like this:
document.cookie = "theme=" + encodeURIComponent("blue theme") + "; max-age=" + 60*60*24*30 + "; path=/; domain=thesitewizard.com" ;
Also, Atlassian have api for managing cookies - https://developer.atlassian.com/display/AUI/AJS.Cookie - but it stores all values in one key/value map. But you can try it.
If there is strong requirement to store cookie in macro, then you have to add instance of CookieUtils to Velocity params and then call it like
$cookieUtils.createCookie($name, $value, $req)
Honestly, I didn't try to do that in Confluence macro. But I'm absolutely shure, that it work in Jira's Web Action.
Hope it helps :)
To answer “How scrum works,” most of the teams I've worked with first addressed the question: “where to start?” That question applies to both implementation and improvements on the Scrum framew...
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!
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