I need to hide some fields in Edit screen based on the status(open,resolved etc) of the issue.How can I get the status in Jquery or Java script
Status won't be there on the edit screen.
You might want to use workflow operation to edit the fields where you can direct to different transitions based on workflow status each have a different screen!
It's not on the screen but you can get it like this:
AJS.$.get(AJS.params.baseURL + "/rest/api/2.0.alpha1/issue/" + AJS.$("#key-val").text(), function (data) { console.log (data.fields.status.value.name); })
BTW you can do this with the behaviours plugin without writing any code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah REST! Nice one..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks Jamie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jamie,
I am not able to store the status in a variable.My intention is to hide some fields in the "Edit Screen" base don the status.
Regards
Anoop
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So, if data.fields.status.value.name is Opened, then you hide the field. You should try this with the behaviours plugin, no coding is required at all for hiding fields based on status.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.