Fill in Work Item without Template!?
Greetings,
Is there a way to use a URL parameter, or a cookie or whatever that will open a work item with some fields filled in?
We'd like to simplify the creation of a work item for a project where the users can submit change requests. We want to have a link on a dashboard that shows a long description of "click here to submit an enhancement request for x, y, z". When the link is clicked, we want a work item to appear with the correct 'Filed Against' selected.
We know about Templates, and we know how to make a URL link to the work item "Create from template" wizard... but the user will be faced with which template to choose. We'd rather not have to say "to create an enhancement request for x, y, z, click the link below and then select "X, Y, Z, Template". Maybe I'm seeking something that is too elegant...
One thought I had is... is there a way to get a URL parameter or cookie in a script-based calculated values?!? We could potentially set that up.
2 answers
For all I know this could be done using JavaScript and the OSLC CM API. You could, for example, create an open social gadget and that could display a button which allows to create a work item (using the creation factory for the work item type) and fills out the values as desired.
Start here:
Comments
I think I have a suggestion that might be possible. I had never considered it before, but it occurs to me now that it might be worth investigating. In fact, I'm pretty sure it would work actually.
We already have a Theme that includes some JavaScript that runs every time a page in RTC opens. The JavaScript in this theme adds the "309 SMXG Help" hyperlink to the navigation bar.
We could add another feature into this JavaScript so that it also looks at the URL in the address bar and if it contains the parameters we've defined, it puts the value of those parameters as text into the field in the work item if the fields are present on the page.
I just tested this to verify that if I add parameters to the URL, they don't get dropped from the URL when the browser navigates to the target CLM page and they DON'T. That surprised me. CLM clearly ignores those extra parameters, but it preserves them in the address bar which would leave them available for examination by the JavaScript.