I have a transition screen which includes a user picker. To allow the end user using that transition screen to make an informed business decision I have a requirement to display a readonly field containing the username of a user who completed a particular prior step. EDIT: The source is a custom user picker field and not the assigned field.
I have tried a custom read-only field and a post function field to field copy however it errors presumably because the source is a user field and the destination is a text field.
It seems like a really obvious common sense business requirement to be able to have fields as display only on a transition form yet I cannot seem to figure out how to do it.
How do I achieve this requirement?
Community moderators have prevented the ability to post new answers.
I ended up building a plugin "Visible Readonly Text Field" to achieve this. Of course it's necessary to maintain 2 separate fields for the same value and to copy the value from field to field. Display the readonly field on all the display transition screens and the user picker field on the assignment transition. It's awkward having 2 fields but at least this custom field type actually displays on a transition screen and because of that this solution works.
I setup a centos VM dev environment with eclipse to do it. The trick was finding the velocity scripts that come with JIra and merging the view-basictext.vm view functionality into the new edit-jirareadonlytext.vm edit script.
Source and plugin are attached to save others the effort.
Quick question @David b: is your plugin compatible with older releases of JIRA (such as JIRA 6.3.x)? Your plugin has been a great addition to one of my requirements.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Officially I have no idea what versions it will work with. It's about as simple as a custom field can get so I expect it should work. The source is there so it should be possible to rebuild it against an older version if you need to.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks! I'll cross-check this, and see how it goes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use script to make fields readonly.
document.getElementById('customfield_id').disabled =true;
document.getElementById('customfield_id').style.background="silver";
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can make fields readonly by only adding them to the view screen. The error when copying sounds like a different problem
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use "Copy Value From Other Field" from JIRA Suite Utilities: https://marketplace.atlassian.com/plugins/com.googlecode.jira-suite-utilities
Here is the doc with samples: https://jsutil.atlassian.net/wiki/display/JSUTIL/JIRA+Suite+Utilities+Workflow+Post-Functions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"Copy Value From Other Field" errors when the source is a custom field of type user picker. The example shows "assigned" which works but my scenario doesn't. The secondary issue i'm discovering is that the read-only field refuses to actually display on a transition screen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looks like you need to write your own post-function. You can utilize Script Runner to save on addon creation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sadly a steep learning curve for fundamentally basic functionality. Plus the refusal to display a readonly field on a transition screen would constitute a bug as there's no way a post function can make a field display.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.