Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

AJS cookies replacement

Anatoly V Kutyakov May 17, 2016

https://docs.atlassian.com/aui/latest/docs/helper.html says that AJS.Cookies is deprecated. But no any additional info of the reasons (why it is deprecated) and, which is more important - no info about substitution (or no substitution). 

For now I am using JIRA 6.3.4 and planning to move to the latest one. So I am curious about if I need to re-write my plugin's client code to migrate from AJS.Cookies.

Thank you for answers.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Remo Siegwart
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 17, 2016

When I execute the code AJS.Cookie.read("COOKIES_ARE_COOL") in the browser's console, the output says:

DEPRECATED JS - Cookie has been deprecated since 5.8.0 and will be removed in a future release. Use cookie instead.

So I guess they just want you to use AJS.cookie instead of AJS.Cookie.

Hope this helps.

Cheers
Remo 

Al Johnson March 1, 2017

@Remo Your answer is not the best.  AJS.cookie === AJS.Cookie returns true, so they are the same function.  Not clear on what you are saying.  

Remo Siegwart
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 1, 2017

Instead of criticizing other user's answers, you could have tried to write a better one.

Of course they are the same function. Atlassian just renamed AJS.Cookie to AJS.cookie and want you to use AJS.cookie from now on. Pretty obvious IMHO if you would have spent another minute on it.

Al Johnson March 3, 2017

Thanks for bringing this issue to my attention.  I shall stride to spend an extra minute when reading your answers ;0)

Remo Siegwart
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 3, 2017

No worries, maybe I should have been more clear in my answer.

TAGS
AUG Leaders

Atlassian Community Events