I have a scenario where two separate departments were using our Workfront instance and created multiple similar fields for the same types of data (for example, one department had a field called "Form number" and the other had a field called "Form #"). We'd like to do a mass clean-up and consolidate these "duplicate" fields, which of course all have data in them already. Is there a way for me to do this without Fusion, and without having to pull a report with both fields in columns and copy + paste for hours?
Solved! Go to Solution.
Hi @Scott_Goodwin, thanks so much for starting me down this path. Was able to take an hour this aft and dive into API calls. Incase anyone else is a newbie on this topic like me and can learn from my experience, here's the steps I took using my fields "Form number" and "Form #" as examples:
=HYPERLINK("https://MY INSTANCE NAME.my.workfront.com/attask/api/v17.0/project?ID="&[@ID]&"&apiKey=MY API KEY&method=PUT&DE:Form%20%23="&[@[Form number]])
5. I'm sure there's a way to automate this step, but just for testing purposes, I manually clicked a dozen of the links to see if they worked. @Scott_Goodwin do you have any ideas on automating this part and/or if there's any limitations to how many changes I can make in a timeframe via API calls?
Note, I actually did all of this in my Preview environment first.
Thank you again Scott, I wouldn't have thought of exploring API calls as I was unfamiliar with them until this afternoon's crash/bash course. Really appreciate it!
Views
Replies
Total Likes
Hello @-JC
Where is the field being used? Is it attached to projects, tasks etc? are they both used for the same objects.
There mite be something you can do with API itself if you dont have Fusion. But I need to the above before I have a play with it on our instance.
Thank you
Hi @Scott_Goodwin, thanks for chiming in. We're just starting to explore all the overlapping fields but most of them live on the project level. Anything you can think of given that knowledge? Many thanks.
Views
Replies
Total Likes
Hello @-JC
Are the fields in the same Custom Form and if not do you know if the custom form with the fields will be available in the projects your trying to map the values to?
If they are Ill have a look at custom coding something. If not that's abit more treaky
Hi @Scott_Goodwin, no, they're on two version of a "project details" custom form. So for example, there's Department 1 Project Details custom form with "Form number", and Department 2 Project Details custom form with "Form #". The two custom forms do have shared fields as well as the overlapping/duplicate fields.
For the custom forms being available, right now any projects owned by the respective departments each have their own version of their custom form. I suppose there's always the option to add all the duplicate fields to one of the custom forms first (still have to determine which ones are "used the most"/have a higher number of those duplicate fields being filled out). Alternatively, I could create a third custom form only visible to me to store data from all the duplicate fields for now - I could attach it to all our currently active projects for example.
I just want to be sure I understand what you'd be trying to achieve before you do any (potentially time-wasting) work here - what would the output be? I see in your other comments you mention a browser extension - I would want to make sure I'm not blocked by corporate security in using something like this, for example. Thank you again!
Views
Replies
Total Likes
Hello @-JC
Thank you for your reply.
I would add the "Form number" field to the other custom form and leave it blank.
Then the outcome would be to copy over the value from "Form #" to "Form Number" so that both custom forms have the right data in the "Form Number" field leaving you to delete the no longer used "Form #" is that what you would want from it?
Also in terms of security there is no issue, if you are logged into Workfront you already have access to the API, it is based off your Session and your access levels. No data or anything is used. The extension I was talking about is something I have created myself to help present the usage of fields. But again doesn't store data or anything like that it just uses the session of the person logged in. Its all API calls you can make in the browser if you know how to.
Hi @Scott_Goodwin, thanks so much for starting me down this path. Was able to take an hour this aft and dive into API calls. Incase anyone else is a newbie on this topic like me and can learn from my experience, here's the steps I took using my fields "Form number" and "Form #" as examples:
=HYPERLINK("https://MY INSTANCE NAME.my.workfront.com/attask/api/v17.0/project?ID="&[@ID]&"&apiKey=MY API KEY&method=PUT&DE:Form%20%23="&[@[Form number]])
5. I'm sure there's a way to automate this step, but just for testing purposes, I manually clicked a dozen of the links to see if they worked. @Scott_Goodwin do you have any ideas on automating this part and/or if there's any limitations to how many changes I can make in a timeframe via API calls?
Note, I actually did all of this in my Preview environment first.
Thank you again Scott, I wouldn't have thought of exploring API calls as I was unfamiliar with them until this afternoon's crash/bash course. Really appreciate it!
Views
Replies
Total Likes
Hello @-JC
That is great news and a great way to do it. What you could do it write a simple Java script Script. I've added an example.
This will go through the list of the links. Until all links have been has been hit.
const links = [
'https://another-example.com',
// Add more links as needed
];
async function callLinks(linkList) {
for (const link of linkList) {
try {
const response = await fetch(link);
console.log(`Successfully called ${link}, Status Code: ${response.status}`);
} catch (error) {
console.error(`Failed to call ${link}, Error: ${error}`);
}
}
}
// Call the function with the list of links
callLinks(links);
If you have a Google on how to run these for the computer your on there should be enough documentation out there to get this running. Let me know if you have any trouble.
If there hyperlink creation part takes alot of time we can look at that aswell. But I'm hoping it's just a drag down the sheet job.
Views
Replies
Total Likes
I'll be following this thread as i may have the same situation on a large scale soon.
I think one of the first things to do would be to gather all the fields being used, separate the unique fields and then find the similar fields and map them together on paper. This way you'll know the scale of how many fields should be standardised and combined. I've done this before with seven different agencies, all using Workfront, merging into one WF instance. Exactly the scenario you describe.
After that, you have to name the fields that will prevail and then (and this is the hard part), transfer the values from the deprecated fields to the corresponding standardised fields.
I used Fusion and did this field by field but I understand you don't want to go the Fusion route.
@RandyRoberts I have a browser extension tool that I have created that pulls all the custom fields and shows you where they are being used in terms of how many projects, tasks, custom forms etc and shows you the tally for each field. It also allows for you check individual ones and then gives you links off to where it is being used.
So the API can definitely pull that data, and with some coding you can most likely get it to pull the data find the ones that you have mapped out on paper as you say as I don't think there is away around that with the API.
However there is a potential with the list of custom fields you want to map you can use the API. Pull down both the custom field you want to keep and the custom field you want to map and then bulk update, copy the value from the JSON moving it over to the other custom field. Update the ones you have copied to be empty. Then pull a report to see where that custom field is being used (hopefully comes back with nothing and you can delete it)
Many ifs and buts though as I would need to test it all out and see what the API structure looks like for bulk updating mite have to pagination and individual update each project. Do things like make sure that custom field you want to map is present if not then attach the custom form to it and then update etc. So quite a few things to consider without fusion involved.
Views
Replies
Total Likes
That sounds like pretty useful browser extension!
Views
Replies
Total Likes
Thank you @RandyRoberts It works pretty well. Uses the local session as well so can only see what the person who is logged in can see. I mite look at productizing it at some point.
Views
Replies
Total Likes
Hi @skyehansen, thank you, appreciate the link - not sure a) I can convince my org to pay for a solution, and b) if this solution can run with SSO configured (at least I can't get tests from Doug's site to work as we don't have passwords with SSO configured). Hopefully it can help someone else though