We have a requirement of hiding custom field based on workflow status.
Is there any configuration available in jira cloud to achive this?
(eg:- If Workflow "Status" value is 'open' then show "Custom field A" and "Custom field B"
if Workflow "Status" value is 'Inprogress' then show "Custom field A" ,"Custom field B" and "Custom field C"
if Workflow "Status" value is 'closed' then show "Custom field A" ,"Custom field B" , "Custom field C" and "Custom field D")
I think a solution could be by keeping Edit and View screen separated. Custom fields do not show in the view screen unless they have a value, so you can play with this.
I would solve it like this.
1. Keep an "Edit" screen for all your issues, withonly custom field A and B
2. However in the "View" screen all custom fields A B C and D can be seen. However keep in mind that they will not be seen if they do not have a value.
3. Create transition screens for each one of the statuses, where the user is prompted to add the values. For example, the screen for the transition to "in progress" there will be the field "C".
4. If the user adds a value there, then it will show in your "View" screen.
5. You might want to change the value for the field C though, and you cannot do it from the edit screen. Therefore you can add a transition from "In Progress" to itself using as the same transition screen you used from "open" to "in progress".
6. Repeat the above for the transition between "in progress" and "closed".
I think this is the clean way to go, which I would recommend
The other way to go is the nasty javascript hack.
The base would be
<script>
if ($("#status-val").text("in progress")) {$("#rowForcustomfield_12345").hide();}
</script>
Change "in progress" with any other status you want, and make sure you amend correctly the id of the custom field.
I hope it helps
We want to do the same thing. I'm new to Jira. Where would we insert that javascript at?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Randal
There are two places where you can do it. Either in the space for the "Announcement Banner" or in the description of a custom field.
The first option is very drastic, as it will affect the whole system/all projects.
The second option gives you the possibility to use one custom field just for one project and inject the JS in the description of that custom field, so you are sure this JS runs only when the field appears.
Still, it is a nasty hack so make sure you test it well and be prepared to surprises
Good luck with it!
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.