Git Product home page Git Product logo

restdatamappingpicklist's Introduction

Rest Data Mapping Picklist

An Azure DevOps Work Item Form Extension

This is an extension for Azure DevOps to load Rest data into a simple picklist.

https://marketplace.visualstudio.com/items?itemName=dedac.RestDataMappingPicklist

You can map additional data from the same rest call to other fields in the Work Item

Build the dev version and run locally

  1. Build and the Dev Extension
    npm run build-dev
    npm run package-dev
    
  2. Upload the Visual Studio Marketplace and invite a test organization
  3. Setup a local signing certificate here are some sample instructions
    (you can skip this step, but when you serve-dev navigate to https://localhost:44300/webpack-dev-server and accept that you are going somewhere 'unsafe')
  4. Build and run the extension locally
    npm run serve-dev
    
  5. Install the extension in a work item and configure it
  6. Enjoy testing the extension

To Build and package the control for production, simply run

npm run build

And upload to the visual studio marketplace, or use npm run gallery-publish with your valid token

restdatamappingpicklist's People

Contributors

dedac avatar dependabot[bot] avatar yvz5 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

restdatamappingpicklist's Issues

Hide Native Field Name in Container

Hi there.

By default the field name is displayed in the container where the picklist is placed. Normally I would expect the decorated field name to be hidden when a Label is given in the Layout-section of the custom control. I cloned the project and found a way to hide the label (simply removed the label-attribute from FormItem in RestSelectorControl.tsx).

Of course it would be best to have either an automated way to do this or maybe provide a button in the custom control options to switch the behavior.

Best, Alexander

parameterize Rest Service Address

Hi, is it possible to extend the Rest Service Address with data from the workitem fields ? something like: http://api.com?id={Custom.Id}

Question - Call Operation

Hi all!
First of all I thank you for the extension, excellent work!

I already made it work, now I need to optimize the times because the component takes a long time to load.

Context: The REST service fetches approximately 45k items in the JSON. I did this without parameterization because I assumed that the component does not support successive AJAX calls, but that it calls only once each time the work item is opened. this is so?

Otherwise, you would need to call with the parameter of what the user is currently typing. Can that be done?

Greetings

Where to enable CORS for adding https://dedac.gallerycdn.vsassets.io domain

Hi,

I installed this extension from the Marketplace. It installs fine but it does not work as expected as I can't get any results in my picklist. I tested my Rest service and works as expected. I checked the extension and at the overview in the Marketplace it says

Add https://dedac.gallerycdn.vsassets.io to the CORS allowed domains to use the extension

I have been trying to find where to enable CORS for this domain on Azure Devops but cannot find it anywhere. Any help please? I'm fairly new to Azure Devops.

Thanks in advance.

Provide bearer token authentication

Hi there.

Many thanks vor providing the RestDataMappingPicklist.
Would it be possible to build a more sophisticated authorization support like Bearer Token? Using a specific username is not always possible due to security restrictions.

Best,
Alexander

FieldName expand workItemFieldTypes

Current FieldName:

"id": "FieldName",
  "name": "Select the field for this control.",
  "description": "The field associated with the control, it will match the value from the rest service's key field.",
  "type": "WorkItemField",
  "properties": {
      "workItemFieldTypes": ["String", "PlainText", "HTML"]
    },
    "validation": {
      "dataType": "String",
      "isRequired": true
    }

It would be awesome if workItemFieldTypes accepted Integer and TreePath types. Validation would have to be altered. However, this would allow for System.IterationID and System.IterationPath to be an acceptable WorkItemControl. This would allow for WorkItem TargetDate to dynamically be populated based on the iteration attributes. Currently WorkItem TargetDate can be set outside of a project teams iteration start and end dates.

Unable to load the field values in latest Edge Browser

Contact Details

[email protected]

What happened?

I was testing the extension, but it doesn't load the values in latest version of Edge and works fine in Chrome/Firefox looks like some compatibility issues with versions defined in modules?

Version

1.0.2 (Default)

What browsers are you seeing the problem on?

Microsoft Edge

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Bug]: System.Id not able to be used for URL parameter

Contact Details

No response

What happened?

When calling an API, and a URL Parameter is required, it seems System level variables are not passed.

Rest Call URL Parameters used:
image

Browser api call - field blank:
image

Version

1.0.2 (Default)

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

[Bug]: cors value in documentation needs fixing

Contact Details

No response

What happened?

When calling an external api, this CORS value needs to be added:
https://martinlundhgren.gallerycdn.vsassets.io/

In your documentation here (https://marketplace.visualstudio.com/items?itemName=MartinLundhgren.RestDataMappingPicklist&ssr=false#overview) it suggests another cdn value is required (https://dedac.gallerycdn.vsassets.io/).

Adding the alternative one fixes the problem.

Version

1.0.2 (Default)

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

New version 0.2.7 updated in MarketPlace broke my integration

Hi,

This extension was working fine but recent update (0.2.7) done automatically on AzureDevops broke it. Configuration seems fine as per extension instrucctions and I can access the Rest endpoint without issues, which has not been changed at all.

CORS is also enabled at the endpoint server.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.